flowaccount / nx-plugins

Nx plugins built by FlowAccount team, helps deploy systems to the cloud
115 stars 34 forks source link

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

Open ShaunEdiger opened 4 years ago

ShaunEdiger commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

baseWorkspaceTsConfig is false as default

wickstargazer commented 3 years ago

releasing in v0.5.3