question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when using npm link into an angular-cli project

See original GitHub issue

Currently a freshly generated project causes the following error when using npm link to test the library within a local angular-cli project;

ERROR in Error encountered resolving symbol values statically. Calling function 'ɵmakeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in /path/to/project/node_modules/library-name/node_modules/@angular/core/core.d.ts, resolving symbol SampleModule in /path/to/project/node_modules/library-name/index.ts, resolving symbol SampleModule in /path/to/project/node_modules/library-name/index.ts

I’ve dealt with this same problem in a separate library component I have (that does not use this generator) and the solution was to move the @angular/* dependencies from dependencies to peerDependencies in package.json (as here) as it causes some bizarre errors (I believe in TypeScript). I don’t know if this is something you want to deal with?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jvandemocommented, Apr 7, 2017

@IckleChris — Renaming/removing works as well here as a workaround.

Feel free to let us know if you find a better way, while we search for a solution.

Thanks again!

0reactions
jvandemocommented, Apr 19, 2017

@caroso1222 — Thank you, much appreciated! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm link is not working with angular-cli created projects
In Angular 7, "preserveSymlinks": true. It worked for me: project > architect > build > options.
Read more >
Npm link set up advice and troubleshooting - Code Buckets
Troubleshooting npm link · 1. Check you've linked every package · 2. Don't globally install your local packages · 3. Check you've linked...
Read more >
Why isn't the npm link command working? | Benjamin W Fox
Run npm link my-package in the my-project directory. If two steps is too many, you can make this a one-step process using a...
Read more >
Usage of Angular libraries published to npm
Adding a library to the runtime global scopelink · Install the library and the associated dependencies using the npm package manager: content_copy npm...
Read more >
Converting your Angular CLI application into a NPM Module
The second, and preferred method, is using the npm link command to create a reference to your local code. This method 'tricks' npm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found