install using yarn failed
See original GitHub issueI 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Works like a charm! Thanks a lot! 😄
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!