Node-sass安装错误:找不到“error-ex”包。

5
当我尝试在使用yarn的React应用程序中安装sass-loader依赖项的同时安装node-sass时,出现了以下错误:
yarn add v1.22.0
[1/4] Resolving packages...
warning node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
error Couldn't find package "error-ex" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

我已经有最新版本的yarn和npm。同样的命令几天前似乎可以使用。但现在无法工作。现在我必须切换到dart-sass而不是node-sass。我通常在安装依赖时不指定版本。这个错误和那个有关吗?
以下是我的依赖项:
"dependencies": {
    "@babel/core": "^7.8.4",
    "@babel/plugin-proposal-class-properties": "^7.8.3",
    "@babel/preset-env": "^7.8.4",
    "@babel/preset-react": "^7.8.3",
    "babel-loader": "^8.0.6",
    "css-loader": "^3.4.2",
    "normalize.css": "^8.0.1",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-router-dom": "^5.1.2",
    "sass": "^1.25.0",
    "sass-loader": "^8.0.2",
    "style-loader": "^1.1.3",
    "webpack": "^4.41.6",
    "webpack-dev-server": "^3.10.3"
  },
  "devDependencies": {
    "webpack-cli": "^3.3.11"
  }

4
npm 注册表出现了一些错误。您可以在此处检查状态:https://status.npmjs.org/,问题应该会很快解决。 - Geku
1
感谢 @Geku。我今天运行了 yarn add,它可以工作。 - ahrooran
好的,知道了!这对我也起作用了 :) - Geku
1个回答

3
在终端中尝试执行以下命令:npm config set registry https://skimdb.npmjs.com/registry

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接