npm WARN 已弃用 graceful-fs@3.0.8:graceful-fs 版本 3

npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3

我正在 运行ning npm install 但它给了我一个错误。在更新之前,我还尝试 运行 下面的命令。 $npm install npm 我也更新了 graceful-fs.

$ npm install -g graceful-fs
graceful-fs@4.1.3 C:\Users\RDY672\AppData\Roaming\npm\node_modules\graceful-fs

错误如下:

$ npm install -g bower@1.3.12
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated graceful-fs@2.0.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm ERR! cb() never called!
npm ERR! not ok code 0

TL;DR: 如有必要,只需提交错误,暂时忽略弃用警告。除非它抛出错误,否则这不是你的问题。


最有可能的是,它间接依赖于依赖于 Node 内部模块的 graceful-fs 的过时版本(即使它不应该)。该模块必然 确实 严重依赖于 Node 的实现细节,但 4.x 在这方面被编写得不那么脆弱。 3.x 和 4.x 之间的 API 几乎没有什么变化。

就其价值而言,几周前该模块在 npm 上的下载量排名第十。我认为变化不大。并且由于该模块的大量使用份额(npm 本身 间接 取决于过时的版本),Node has already instated a temporary fix where they're trying to get people off of the internal modules.

所以请不要担心,除非您收到来自它的错误。我通常会忽略那些弃用警告,因为它们已经广为人知。

我正在使用 Windows 平台和 Homestead。控制台中的以下命令对我有用:

npm install --no-bin-links
gulp
npm rebuild node-sass
gulp

你不需要担心它,依赖没有任何问题,它只影响开发。 gulp 团队已意识到该问题。

We are aware of the graceful-fs deprecation warning upon install of gulp 3.x.

This is due to: 1. our graceful-fs devDependency 2. the vinyl-fs dependency

Both of which we are unable to upgrade due to API breaking changes.

There is nothing wrong with the dependency, especially since it is only used in development. We will be updating or removing it in gulp 4 and the message will go away.

https://github.com/gulpjs/gulp/issues/1571

npm install -g graceful-fs graceful-fs@latest 适合我。

这会安装最新版本的 graceful-fs!!

我同意所有关于它根本不影响它的评论。但万一你想升级。

首先,检查您已经拥有哪些版本的graceful

$ npm ls graceful-fs

如果您没有最新版本,请安装它

$ sudo npm install -g graceful-fs graceful-fs@latest-version