-
Notifications
You must be signed in to change notification settings - Fork 10
nestjs example with node-package requires includes/paths that point to local node_modules #87
Copy link
Copy link
Open
Description
- If you add
@company/browser-packageto the nestjs app and runmoon run nestjs-app:devthen:
- the tsconfig updates with a new reference that point to
../../packages/browser-package
- If you hard revert all changes and try again with
@company/node-package, nothing happens. - If you manually do the changes to mimic what was done in
#1and then try to createsome.service.tsthat makes use of theaddfunction from@company/node-packagethen you get an error that this file(or any file in the nest-js package) is not included. This is because theincludesdirective is not in the nestjs-app tsconfig.json but instead in thetsconfig.build.jsonwhere the editor can't see it. - if you make that correction for
#3then you get the next error which is that thenode-packagefiles are not in the rootDirexamples/apps/nestjs-app. addingrootDir: "./"to the roottsconfig.options.jsonfixes this.
- if you're following along incrementally here, then
moon run nestjs-app:devwill work - remove the
builddirectory now
- now that we have
rootDirin the roottsconfig.options.jsonand our node-package properly referenced in the nestjs-app tsconfigs... runningmoon run nestjs-app:devfails because thebuilddirectory no longer reflects the structure of the nestjs-app src directory, instead it reflect the structure of the monorepo so nest-cli can't findbuild/src/main(which is now atbuild/apps/nestjs-app/src/main) - if you roll all the changes back to
#2and instead of using../../packages/node-package, usenode_modules/company/node-packageand now everything works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels