繁体   English   中英

npm 错误! 安装代码 EINVALITDAGNAME package

[英]npm ERR! code EINVALIDTAGNAME in installing a package

我正在尝试在我的 React 应用程序中安装 package,但出现此错误

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

这是我在 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"
  },

React 的版本是 17,我的节点版本是 17,但应用程序是由不同版本的节点创建的

我不知道该怎么办

这是因为我的 npm 版本我降级了,问题解决了

npm install -g npm@6.14.14

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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