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: Unexpected value 'NouisliderModule in ...

See original GitHub issue

When I am building my project for production the following error is appearing.

Error: Unexpected value 'NouisliderModule in /path-to-project/node_modules/ng2-nouislider/src/nouislider.js' imported by the module 'MyModule in /path-to-project/src/my.module.ts'. Please add a @NgModule annotation.

Has anyone a tip for me? I don’t know why this error occurs.

Issue Analytics

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

github_iconTop GitHub Comments

13reactions
iCodr8commented, Sep 18, 2017

I changed

import {NouisliderModule} from 'ng2-nouislider';

to

import {NouisliderModule} from 'ng2-nouislider/src/nouislider';

and now it is working… But this is not a nice solution. I think there should be added an index.ts that has a reference to the src/nouislider directory.

1reaction
kikukikscommented, Sep 18, 2017

@iCodr8 This workaround is indeed working. Thank you for that! At least I can continue development until there is an actual fix to the issue.

This seems to be the culprit: https://github.com/tb/ng2-nouislider/issues/113

Read more comments on GitHub >

github_iconTop Results From Across the Web

Karma unit testing error: Unexpected value imported by the ...
Now I got this new error, which I am not able to fix: Failed: Unexpected value 'MatDialogRef' imported by the module 'DynamicTestModule'.
Read more >
Angular Noob here - what does "Please add a @NgModule ...
I am trying to build my angular web app using ng build --prod . ... ERROR in : Unexpected value 'NouisliderModule in /<project_home>/node_modules/ ......
Read more >
Karma unit testing error: Unexpected value imported by the ...
Angular – Karma unit testing error: Unexpected value imported by the module. Please add a @NgModule annotation. angularelectronkarma-jasmineng-modulesunit- ...
Read more >
Testing Angular Material 6: Unexpected Value - ADocLib
ERROR in : Unexpected value 'NouisliderModule in /projecthome /nodemodules/ng2nouislider/src/nouislider.js' imported by the module. the @ ...
Read more >
Error: Unexpected value FormBuilder imported by the module ...
b Error: Unexpected value 'FormBuilder' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation. Import the following ...
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