yarn icon indicating copy to clipboard operation
yarn copied to clipboard

Error during migration from npm to Yarn - Invariant Violation

Open Sulaiman2018 opened this issue 1 year ago • 1 comments

I am currently in the process of migrating from npm to Yarn in my project. However, I have encountered an error during the migration process. The error message is as follows:

error Invariant Violation: expected hoisted manifest for "ngx-translate-multi-http-loader#@angular/common#@angular/core" at invariant (/home/user/.nvm/versions/node/v20.9.0/lib/node_modules/yarn/lib/cli.js:2318:15) at _loop2 (/home/user/.nvm/versions/node/v20.9.0/lib/node_modules/yarn/lib/cli.js:91013:9) at PackageHoister.init (/home/user/.nvm/versions/node/v20.9.0/lib/node_modules/yarn/lib/cli.js:91083:19) at PackageLinker.getFlatHoistedTree (/home/user/.nvm/versions/node/v20.9.0/lib/node_modules/yarn/lib/cli.js:48552:20)

The error occurs during the migration process, specifically when running yarn install. I have followed the steps recommended for migration, including removing node_modules and package-lock.json before running yarn install.

Dependencies: "@angular/common": "^14.2.0", "@angular/core": "^14.2.0", "ngx-translate-multi-http-loader": "^8.0.2",

Node.js Version: v20.9.0 Yarn Version: 1.22.21

Sulaiman2018 avatar Jan 12 '24 12:01 Sulaiman2018

Not sure about this error, but if you're migrating to Yarn, you should really migrate to the latest version, not to v1 😃

Daniel15 avatar May 24 '24 22:05 Daniel15