全局npm安装模块,但已全部安装为全局

时间:2016-06-23 19:40:09

标签: module npm

我将描述一种奇怪的情况。

有一个全局安装模块列表

npm list -g --depth=0
/opt/node-v4.4.5-linux-x64/lib
├── cordova@6.2.0
└── npm@3.9.6

但是当我尝试构建我的项目时出现错误

npm install

npm WARN prefer global cordova@6.2.0 should be installed with -g
ctco-ecom-mobcockpit@0.1.0 /app/ctco-ecom-mobcockpit
└── cordova@6.2.0  extraneous

npm WARN optional Skipping failed optional dependency /karma/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm WARN optional Skipping failed optional dependency /webpack/watchpack/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12

1 个答案:

答案 0 :(得分:0)

我看到"错误"是警告(警告)。也就是说,它安装成功但没有完整的功能(可选的依赖" fsevents"无法加载)。

你需要找出一些满足这种依赖性的其他包来摆脱警告。如果包装需要它,它不应该是可选的,否则它应该工作。

您的项目实际上可能会因为缺少" fsevents"模块。

相关问题