52

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 -g graceful-fs
graceful-fs@4.1.3 C:\Users\RDY672\AppData\Roaming\npm\node_modules\graceful-fs

ERROR is as below :

$ 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
2
  • 3
    FWIW, gulp (a very popular tool) depends on glob-watcher which internally depends on graceful-fs 1.2.3. It complains about this all the time. It feels like there's going to be a crunch at some point... Mar 20, 2016 at 4:12
  • 1
    glob-watcher issue#22 suggests this may not have been fixed because glob-watcher is getting deprecated Mar 28, 2016 at 0:07

5 Answers 5

52

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


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 does depend 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.

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 indirectly depends on an outdated version), Node has already instated a temporary fix where they're trying to get people off of the internal modules.

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

2
  • 4
    How do I upgrade graceful-fs? sudo npm install -g graceful-fs graceful-fs@4.1.3 /usr/local/lib/node_modules/graceful-fs $ npm install angular-mass-autocomplete 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. Mar 23, 2016 at 20:19
  • 1
    @GregDougherty You don't need to upgrade it directly - you need to first figure out what modules indirectly depend on it, and then contact the maintainers of those modules to either update it themselves or do likewise. (You'd be surprised how many people depend on an ancient version of glob, which happens to depend on the outdated graceful-fs. This is the main driver for this issue, nothing else for the most part.)
    – Claudia
    Apr 26, 2018 at 23:18
48

npm install -g graceful-fs graceful-fs@latest works for me.

This installs the latest version of graceful-fs!!

1
  • 1
    In my case I already had graceful-fs installed so I ran npm update -g graceful-fs@latest and that did the trick
    – Ian
    Jan 31, 2018 at 23:02
7

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.

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

2

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
3
  • latest-version didn't work on Unbuntu 14.04 for me. No compatible version found: graceful-fs@latest-version Valid install targets: 4.1.4, 4.1.3, 4.1.2, 4.1.1, 4.1.0, 3.0.8, ...
    – Preston
    Jul 9, 2016 at 23:12
  • Change word "latest-version" for one of the latest version you have available ... Sorry my bad,i didn't explained that you should not include the word "latest-version".... I hope it works for you.
    – Vic B-A
    Jul 10, 2016 at 16:53
  • Sorry Vic, I spaced out on that. Struggling with an Ubuntu / Zurb Foundation For Apps setup on Vagrant and wasn't sure if this was a contributing factor. Anyway, at the time of this comment this works: npm install -g graceful-fs graceful-fs@4.1.4
    – Preston
    Jul 11, 2016 at 16:54
0

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.