Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run build overwrites tsconfig.json and cannot compile #14539

Closed
tsiege opened this issue Jun 24, 2020 · 2 comments
Closed

npm run build overwrites tsconfig.json and cannot compile #14539

tsiege opened this issue Jun 24, 2020 · 2 comments

Comments

@tsiege
Copy link

tsiege commented Jun 24, 2020

Bug report

Describe the bug

npm run build overwrites my tsconfig.json, enforcing isolatedModules, which then cannot compile. I am also using apollo codegen to create typescript files for my queries. This creates several files, one of which is called globalTypes.ts. Currently it is an empty file; however, it being an empty files conflicts with the isolatedModules flag and blows up. I've tried switching this, but my hack at the moment is deleting the file during prebuild. I'd to have the ability to overwrite this. I've seen this issue (#8128) from a year ago, and I'm not sure where along in the process this is. I'd like to have something less hacky then blowing away files to make my build work, and share my use case of why I need to this to not be overwritten.

Here's the error

/Users/tristan/code/thedipp/www.thedipp.com/types/generated/globalTypes.ts
ERROR in /Users/tristan/code/thedipp/www.thedipp.com/types/generated/globalTypes.ts(1,1):
1:1 All files must be modules when the '--isolatedModules' flag is provided.
  > 1 | /* tslint:disable */
      | ^
    2 | /* eslint-disable */
    3 | // @generated
    4 | // This file was automatically generated and should not be edited.

Here's the contents of the file

/* tslint:disable */
/* eslint-disable */
// @generated
// This file was automatically generated and should not be edited.

//==============================================================
// START Enums and Input Objects
//==============================================================

//==============================================================
// END Enums and Input Objects
//==============================================================

Expected behavior

I'd expect my tsconfig to not be overwritten.

@timneutkens
Copy link
Member

Duplicate of #8128

@timneutkens timneutkens marked this as a duplicate of #8128 Jun 26, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants