简体   繁体   中英

npm ERR! code EINVALIDTAGNAME in installing a package

i am trying to install a package in my react app but i get this error

$ npm install xlsx
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "react-scripts  start": Tags may not have any characters that encodeURIComponent encodes.

this is my scripts in package.json

  "scripts": {
    "start": "react-scripts --openssl-legacy-provider start",
    "build": "react-scripts --openssl-legacy-provider build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

version of react is 17 and my node version is 17 but app created by a different version of node

i don't know what to do

it was becuase the version of my npm i downgrade it and problem solved

npm install -g npm@6.14.14

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM