每次键入 npm 时优雅的 fs 警告消息 [英] graceful-fs warning messages each time when type npm

查看:71
本文介绍了每次键入 npm 时优雅的 fs 警告消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚安装了 Node 6.9.1

Just installed Node 6.9.1

npm - 3.10.8

当我输入 npm -v 时,我收到以下警告 不支持重新评估本机模块源.如果您使用的是 graceful-fs 模块,请将其更新到更新的版本.

When I type npm -v I am receiving the following warning re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

如何摆脱这条消息?

我试过npm uninstall graceful-fs -g
npm install -g graceful-fs graceful-fs@latest.

然后输入 npm list graceful-js -g 显示:

<代码>+-- 余烬cli@2.6.0|+-- bower-config@1.4.0||`--graceful-fs@4.1.11|`-- npm@2.15.1|`--graceful-fs@4.1.11`--graceful-fs@4.1.11

npm@2.15.1 使用的是 4.1.3 - 我认为这个版本不会退出.graceful-fs.但我已经手动修复了.

npm@2.15.1 was using 4.1.3 - I think this version doesn't exits. graceful-fs. but I have fix it manually.

在那之前我已经尝试过这个命令

仍然在输入 npm -v 时,cmd 向我显示了大约 5-6 个警告......

And still when type npm -v, cmd shows me a around 5-6 warnings ...

编辑

树依赖 npm list graceful-js -g不同的是我只是全局安装了grunt

tree dependency npm list graceful-js -g The difference is that I just installed grunt globally

<代码>+-- 余烬cli@2.10.0|+-- bower-config@1.4.0||`--graceful-fs@4.1.11|`-- npm@3.10.8|`--graceful-fs@4.1.6+-- 优雅-fs@4.1.11`-- grunt@1.0.1`--dateformat@1.0.12`--喵喵@3.7.0`-- read-pkg-up@1.0.1`-- 读取-pkg@1.1.0`--load-json-file@1.1.0`--graceful-fs@4.1.11

编辑 2

npm la ember-cli -g 后输出为:

用于开发雄心勃勃的 ember.js 应用程序的命令行工具
git+https://github.com/ember-cli/ember-cli.git
https://ember-cli.com/

推荐答案

经过15个小时的挖掘,我找到了解决方案:

After 15 hours of digging, I found the solution:

  • 下载通过 graceful-fs 的最新稳定版 graceful-fs="https://github.com/isaacs/node-graceful-fs/commits/master" rel="nofollow noreferrer">测试 在您的桌面上.
  • 转到C:\Program Files\nodejs\node_modules\npm\node_modules
  • 找出哪些包正在使用 graceful-fs.导航到他们的 node_modules 文件夹并手动替换为从 GitHub 下载的文件.
  • 对所有包执行此操作.
  • Download the latest stable version of graceful-fs that pass the tests on your desktop.
  • Go to C:\Program Files\nodejs\node_modules\npm\node_modules
  • find which of the packages are using graceful-fs. Navigate to their node_modules folders and replace manually with downloaded files from GitHub.
  • Do this for all packages.

就我而言,我使用的是 3.0.8 版.

In my case I used version 3.0.8.

希望它可以帮助某人.

这篇关于每次键入 npm 时优雅的 fs 警告消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆