When I use the Yarn command, it always shows the error message:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/.yarn/releases/yarn-3.0.2.cjs'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v17.0.1
Try to do the following:
rm ~/.yarnrcrm yarn.lock and rm .yarnrc.yml (if these files exist) from your project's directory"packageManager": "[email protected]" from your package.jsonyarn installI found an explanation why this is happening here: https://github.com/yarnpkg/yarn/issues/8460
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With