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

[BUG] Reference to tsconfig.json broken; renamed to tsconfig.base.json #51

Open
ShaunEdiger opened this issue Aug 26, 2020 · 3 comments · Fixed by #58
Open

[BUG] Reference to tsconfig.json broken; renamed to tsconfig.base.json #51

ShaunEdiger opened this issue Aug 26, 2020 · 3 comments · Fixed by #58

Comments

@ShaunEdiger
Copy link

Describe the bug
Generated serverless project refers to non-existent tsconfig.json. It appears a recent commit renamed the file to tsconfig.base.json.

To Reproduce
Steps to reproduce the behavior:

  1. Obtain an nx workspace
  2. Add a serverless framework project – npx nx g @flowaccount/nx-serverless:api-serverless --name=bug-repro --provider=aws --directory=
  3. Add a plain TypeScript lib to the workspace – npx yarn add @nrwl/node && npx nx g @nrwl/node:library "@someorg/constants"
  4. Open handler.ts from the serverless project created prior and add the statement import {foo} from '@someorg/constants';
  5. The IDE will complain about the import because it cannot locate the lib

Expected behavior
The IDE should find the lib. The tsconfig in the serverless project should contain a valid reference to the root tsconfig.

Check which provider is affected:
[x] AWS
[] Azure (not tested, but likely)
[] Google Cloud Platform (not tested, but likely)

Check which framework is affected:
[] Angular (not tested)
[] Nodejs (not tested)
[x] Serverless
[] Lambda (not tested)
[] Infrastructure as a code (not tested)

Additional context
This commit in the nx project seems to be the culprit.

As a workaround, I created a tsconfig.json that extends tsconfig.base.json.

@wickstargazer
Copy link
Member

I have gotten into looking on how to support both version 10 and backward compatable for version 9. I will get back to you shortly on when and how the schematics will be fixed 😄
If you would like to collaborate let me know!

@wickstargazer
Copy link
Member

baseWorkspaceTsConfig is false as default

@wickstargazer
Copy link
Member

releasing in v0.5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants