在执行npm安装时,面对请求的项目被隔离:sockjs@0.3.18

时间:2018-01-15 20:53:39

标签: javascript node.js npm

我在项目中执行npm install时遇到以下问题。我不确定是什么导致了这个问题。这是节点版本v7.8.0和npm版本v5.6.0

npm WARN deprecated babel-preset-es2015@6.24.1:   Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

**npm ERR! code E403
npm ERR! 403 Requested item is quarantined: sockjs@0.3.18**

以前有人遇到过这个问题吗?如果是,请提供相同的解决方案。

1 个答案:

答案 0 :(得分:0)

检查主目录中的.npmrc文件。

您似乎在上面的文件中没有https-proxy=YOUR_PROXY_INFORMATION条目,这导致了这个问题。

我也遇到过这个问题,添加了上面的条目,它对我有用。