yarn
yarn copied to clipboard
Error during migration from npm to Yarn - Invariant Violation
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
Not sure about this error, but if you're migrating to Yarn, you should really migrate to the latest version, not to v1 😃