简体   繁体   English

运行Grunt任务时出现graceful-fs警告

[英]graceful-fs warning when running Grunt task

I'm getting this warning when running one of my grunt tasks: 我在运行我的一项艰巨任务时收到此警告:

Warning: (node:2771) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

Does somebody know how to get rid of that? 有人知道怎么摆脱它吗? And how to find it's source? 以及如何找到它的来源? My nodejs version is 6.0.0. 我的nodejs版本是6.0.0。

Your best option right now is to downgrade to the latest Node 5.x until that dependency has been updated. 您现在最好的选择是降级到最新的Node 5.x,直到该依赖关系得到更新。

Suggest that you read: DON'T rush to upgrade to Node v6 and Breaking changes between v5 and v6 . 建议您阅读: 不要急于升级到Node v6在v5和v6之间进行更改

We all want to be on the latest and greatest - myself included. 我们都希望成为最新最好的 - 包括我自己。 A great way to do this is to use something like n or nvm to quickly flip between Node versions so that we can use Node v6 on some projects and older versions on other projects. 一个很好的方法是使用像nnvm这样的东西在Node版本之间快速翻转,这样我们就可以在某些项目上使用Node v6,在其他项目上使用旧版本。

The other thing that I do is I put a package like Node Version Checker in my project and use it in both the tests and the application to make sure that I've changed to the expected version of Node when I start the project or the tests as we often forget to flip to the right version of Node if we have multiple versions on multiple projects. 我做的另一件事是我在我的项目中放置了一个类似Node Version Checker的包,并在测试和应用程序中使用它,以确保在我启动项目或测试时我已经更改为Node的预期版本因为如果我们在多个项目上有多个版本,我们常常忘记翻转到正确的Node版本。

If you're using homebrew here is how you can downgrade to v5.11.0 如果你在这里使用自制软件,你可以如何降级到v5.11.0

brew tap homebrew/versions
brew unlink node
brew install homebrew/versions/node5

And you're good to go. 你很高兴去。

after update to node6 have the same issue. 更新到node6后有同样的问题。 working workaround downgrade, eg nvm use v5.11.0 工作变通方法降级,例如nvm使用v5.11.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM