I'm using Angular 6.0.7. I'm trying to debug one of my packages locally. For that I'm using npm link
. But when I try to serve the application it throws an error,
ERROR in No NgModule metadata found for 'AppModule'.
Following are the steps I followed to link my package
npm link
on my package foldernpm link my-package
on my application folder"include": ["./node_modules/my-package"]
And on the angular.json file "preserveSymlinks": true
.
Before linking the package locally the application works perfectly.
Am I missing something here? Any help would be appreciated.
I was able to fix my issue by doing some changes to the tsconfig file. Hope this helps someone whose having a similar issue.
I had to include the .ts
files in my tsconfig like below,
"include": [
"**/*.ts",
"./node_modules/my-package"
]