Javascript npm WARN 已弃用 [email protected]:graceful-fs 版本 3

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35491905/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-23 17:48:13  来源:igfitidea点击:

npm WARN deprecated [email protected]: graceful-fs version 3

javascriptnode.jsnpmbower

提问by MaxWorld

I am running npm install but it's giving me an error. I also tried to run below command before update. $npm install npm and also I updated graceful-fs.

我正在运行 npm install 但它给了我一个错误。我还尝试在更新之前运行以下命令。$npm install npm 并且我更新了graceful-fs。

$ npm install -g graceful-fs
[email protected] C:\Users\RDY672\AppData\Roaming\npm\node_modules\graceful-fs

ERROR is as below :

错误如下:

$ npm install -g [email protected]
npm WARN deprecated [email protected]: 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 [email protected]: 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 [email protected]: 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

采纳答案by Isiah Meadows

TL;DR:Just file bugs if necessary, and ignore the deprecation warnings for now. Unless it's throwing errors, it's not your problem.

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



Most likely, it's indirectly depending on an out-of-date version of graceful-fs that depends on Node's internal modules (even though it shouldn't). That module by necessity doesdepend heavily on Node's implementation details, but 4.x was written to be less brittle in that respect. Few things changed in the API between 3.x and 4.x.

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

For what it's worth, one count a couple weeks ago had that module as the tenth most downloaded on npm. I don't see that changing much. And because of the large use share of that module (npm itself indirectlydepends on an outdated version), Node has already instated a temporary fix where they're trying to get people off of the internal modules.

就其价值而言,几周前有人统计过该模块在 npm 上的下载量排名第十。我看不出有多大变化。而且由于该模块的大量使用份额(npm 本身间接依赖于过时的版本),Node 已经建立了一个临时修复程序,他们试图让人们摆脱内部模块

So don't worry unless you get errors originating from it. I generally ignore those deprecation warnings, as they're already very well known.

所以不要担心,除非你得到源自它的错误。我通常会忽略那些弃用警告,因为它们已经众所周知。

回答by Vishal2210

npm install -g graceful-fs graceful-fs@latestworks for me.

npm install -g graceful-fs graceful-fs@latest为我工作。

This installs the latest version of graceful-fs!!

这将安装最新版本的优雅-fs!!

回答by Alex

You don't need to worry about it and there's nothing wrong with the dependency as it only affects development. The gulp team is aware of the issue.

你不需要担心它,依赖没有任何问题,因为它只影响开发。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.

我们知道在安装 gulp 3.x 时会出现优雅的 fs 弃用警告。

这是由于:1. 我们的优雅-fs devDependency 2.vinyl-fs 依赖

由于 API 重大更改,我们无法升级两者。

依赖没有任何问题,特别是因为它只用于开发。我们将在 gulp 4 中更新或删除它,该消息将消失。

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

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

回答by Vic B-A

I agree with all the comments about that it doesn't affect it at all. But in case that you want to upgrade.

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

First, check which versions do you already have of graceful

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

$ npm ls graceful-fs

and if you don't have the latest version of it then install it

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

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

回答by mehedi101

I am using the Windows platform and Homestead. The following commands in the console work for me:

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

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