Mocha: npm WARN deprecated graceful-fs

Created on 17 May 2016  Â·  6Comments  Â·  Source: mochajs/mocha

I get the following error:

npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

Tree:

├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]

Most helpful comment

Thanks for the replies. I will wait for the update.
Manually going into the mocha node_modules folder is not a good idea as i don't want to touch external modules.

All 6 comments

Sounds similar to #2200 (the warning about jade) except that not supporting node 7 feels somewhat more serious than just a warning due to some package name change, at least in the long run. Current glob is using caret dependencies as well, so it will probably be _really_ hard to get a single version of mocha to support node 0.8 through 7.0.

Glob 3.2.11 actually is compatible and doesn't have the graceful-fs dependency, so it should work on 0.8 through 7, as far as I can tell at this point; this was already updated by #2201 and will go out in the next release. Until then, at least it's actually not an error but just a warning; even updating to Node 7 might not break it if you're not getting any warnings other than the one on install.

Node v6 & npm v3.8.6 really do not like this. After any command ran through NPM, whatsoever, it floods the screen with warnings because of the [email protected] dependency of glob on mocha. Definitely +1ing the usage of an updated glob.

screen shot 2016-05-17 at 12 06 30 pm


I fixed by manually going into the mocha node_modules folder, npm uninstall glob, changing the package.json to use the 3.2.11 that @ScottFreeCode mentioned, and ran npm install... No more warnings!
screen shot 2016-05-17 at 12 27 32 pm

Wow, I've never seen it dump the fs re-evaluation warning like that before. There might be a good test case in there.

Thanks for the replies. I will wait for the update.
Manually going into the mocha node_modules folder is not a good idea as i don't want to touch external modules.

dupe of #2234 basically

Was this page helpful?
0 / 5 - 0 ratings