-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
- If you add
@company/browser-package
to the nestjs app and runmoon run nestjs-app:dev
then:
- 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
#1
and then try to createsome.service.ts
that makes use of theadd
function from@company/node-package
then you get an error that this file(or any file in the nest-js package) is not included. This is because theincludes
directive is not in the nestjs-app tsconfig.json but instead in thetsconfig.build.json
where the editor can't see it. - if you make that correction for
#3
then you get the next error which is that thenode-package
files are not in the rootDirexamples/apps/nestjs-app
. addingrootDir: "./"
to the roottsconfig.options.json
fixes this.
- if you're following along incrementally here, then
moon run nestjs-app:dev
will work - remove the
build
directory now
- now that we have
rootDir
in the roottsconfig.options.json
and our node-package properly referenced in the nestjs-app tsconfigs... runningmoon run nestjs-app:dev
fails because thebuild
directory 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
#2
and instead of using../../packages/node-package
, usenode_modules/company/node-package
and now everything works.
Metadata
Metadata
Assignees
Labels
No labels