skip to Main Content

Yarn installation for react native project command yarn install not working

yarn start
node:internal/modules/cjs/loader:1050
  throw err;
  ^

Error: Cannot find module '/Users/dynamicmethods/.yarn/releases/yarn-3.6.4.cjs'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1047:15)
    at Module._load (node:internal/modules/cjs/loader:893:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.14.0

2

Answers


  1. This seems due to an issue with the Yarn installation or configuration.
    you trying to use yarn-3.6.4.cjs

    try:

    npm install --global yarn
    yarn set version 3.6.4
    
    Login or Signup to reply.
  2. you can try delete ALL the global yarn configuration files.
    open terminal: rm -f ~/.yarn*.
    then Run yarn set version stable or your specific version
    and run yarn install again

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search