skip to Main Content

I try to use yarn install (node -e ‘process.env.CI||process.exit(1)’ || npx npm-is yarn) on https://github.com/magento/pwa-studio.git but then I get an error:

/Users/name/.npm/_npx/eb07260b9bcce2ea/node_modules/npm-is/npm-is.js:67
    throw new WrongPackageManagerError(allowed, invoked);
WrongPackageManagerError: This project can only be used with the "yarn" package manager, but it was invoked by "/usr/local/lib/node_modules/npm/bin/npx-cli.js", which is not supported.

When I tried it the first time, I was informed that I have to install npm-is before continuing the installation. I installed node and yarn via Homebrew.

Operatingsystem: macOS Catalina 10.15.4,
node: v15.2.1,
yarn: v1.22.10,
npm: 7.0.10.

I don’t know to fix the error. I have tried to reinstall node and yarn but it didn’t help.

2

Answers


  1. You can try removing this line https://prnt.sc/w3cjpt from package.json:

    "preinstall": "node -e 'process.env.CI||process.exit(1)' || npx npm-is yarn",
    
    Login or Signup to reply.
  2. This currently happens with node v15 and up.
    Install NMP n to select Node v14 for PWA Studio.

    npm install -g n
    sudo n v14
    yarn install
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search