大量错误,无法找到模块“乙烯基" [英] Gulp error, cannot find module 'vinyl'

查看:74
本文介绍了大量错误,无法找到模块“乙烯基"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力使通量/反应正常工作,并认为我的npm,node或gulp版本过旧.

I have been struggling with getting flux/react to work properly and thought that my npm, node or gulp versions were to old.

所以我将所有内容都更新到了最新版本,现在在所有项目中运行gulp时都会出现以下错误:

So I updated everything to the latest version and now I get the following error when i run gulp in ALL my projects:

module.js:340
throw err;
^

Error: Cannot find module 'vinyl'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:289:25)
      at Module.require (module.js:366:17)
      at require (module.js:385:17)
      at Object.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/gulp-util/index.js:2:9)
      at Module._compile (module.js:425:26)
      at Object.Module._extensions..js (module.js:432:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:313:12)
      at Module.require (module.js:366:17)

我有:

  1. 已卸载节点并吞没了npm.
  2. 未安装npm.
  3. 通过 https://nodejs.org/en/
  4. 安装的节点和npm
  5. 通过npm安装了gulp

它仍然无法正常工作.

有人有什么主意吗?

推荐答案

正如@keithRousseau所指出的那样,当我重新安装软件包时,我忘记了使用参数-g来安装它们,而是将它们安装为全局软件包.

As @keithRousseau pointed out, when I reinstalled the packages I forgot to install them with the parameter -g to install them as global packages.

用-g重新安装它们,现在可以使用了!

Reinstalled them with -g and now it works!

这篇关于大量错误,无法找到模块“乙烯基"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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