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.

install using yarn failed

See original GitHub issue

I use jhipster angular 4 generator and add sweetalert angular dependency

yarn add sweetalert2 @toverux/ngx-sweetalert2

And I got this error on running using webpack dev server

Uncaught Error: Unexpected value '[object Object]' imported by the module 'MyModule'. Please add a @NgModule annotation.
    at syntaxError (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:1918)
    at eval (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:15614)
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:15597)
    at CompileMetadataResolver.getNgModuleSummary (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:15539)
    at eval (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:15612)
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver.getNgModuleMetadata (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:15597)
    at CompileMetadataResolver.getNgModuleSummary (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:15539)
    at eval (webpack-internal:///./node_modules/@angular/compiler/@angular/compiler.es5.js:15612)

Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
wawansimanggalungcommented, Nov 21, 2017

Works like a charm! Thanks a lot! 😄

1reaction
toveruxcommented, Nov 20, 2017

Thanks, I understand what the problem is. The issue is on my side indeed, expect a fix in the next few hours. In the meantime, and if I’m right, I think that you may be able to workaround it by deleting node_modules and yarn.lock and re-run yarn install. That should dedupe the Angular dependencies, which is what causes the problem here.

Sorry for the inconvenience!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn install keeps failing - Stack Overflow
I just had the same issue. It appears that a remote url for the version of fsevents that my yarn.lock file was referencing...
Read more >
Error Codes | Yarn - Package Manager
When a package is downloaded from whatever its remote location is, Yarn stores it in a specific folder called then cache. Then, the...
Read more >
npm install workd perfectly. yarn install fails. #8493 - GitHub
I'm having a the same issue on Debian Linux but only when using NodeJS Version > 14.x (i.e. 16+) I've successfully added yarn...
Read more >
Yarn install failing - Google Groups
Hi Lewatle, By searching that Yarn error on Google, I came across this suggestion from StackOverflow: https://stackoverflow.com/a/51508426 It notes that in ...
Read more >
Why is my Node.js build failing because of an outdated Yarn ...
When you use Yarn to install node modules, it generates a yarn.lock file which contains a list of the exact modules that it...
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