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.

Unexpected value 'SampleModule' imported by the module 'AppModule'

See original GitHub issue

npm run build cd .\dist npm link

From @angular/cli@1.3.2 project add: src/tsconfig.app.json

  "paths": {
      "@angular/*": [
        "../node_modules/@angular/*"
      ]
    }

src/app/app.module.ts

import { SampleModule } from 'lib';
...
  imports: [
    BrowserModule,
    SampleModule
  ],
...

npm link [lib-name] npm start

Unexpected value 'SampleModule' imported by the module 'AppModule'. Please add a @NgModule annotation.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
william-lohancommented, Aug 28, 2017

@Janatbek yes ng serve --preserve-symlinks works

1reaction
Janatbekcommented, Aug 28, 2017

npm start --preserve-symlinks should solve it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected value '...' imported by the module '...'. Please add ...
js:1540 Uncaught Error: Unexpected value 'BoxModule' imported by the module 'AppModule'. Please add a @NgModule annotation. I've tried: Clearing ...
Read more >
Javascript – Unexpected value '…' imported by the module ...
imported by the module 'AppModule'. Please add a @NgModule annotation. I've tried: Clearing my npm cache; Re-installing all node modules; Forcing all Angular ......
Read more >
Unexpected value 'undefined' imported by the module ...
Coding example for the question Unexpected value 'undefined' imported by the module 'AppModule' at syntaxError-angular.js.
Read more >
Unexpected value 'undefined' declared by the module ... - Reddit
I have my test set up with one declaration, the component being tested, and that component only imports Component and Input from @...
Read more >
generator-angular2-library - npm package - Snyk
If you get Error: Unexpected value '[object Object]' imported by the module 'AppModule'. Please add a @NgModule annotation. , then try:
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