未找到本地gulp(尝试运行:npm install gulp) [英] Local gulp not found (Try running: npm install gulp)
问题描述
我创建了一个模块( webapp-module-storage
),它有以下定义:
package.json
{
dependencies:{
...
},
devDependencies:{
gulp:^ 3.9.1,
...
},
name: webapp-module-storage,
scripts:{
postinstall:gulp build,
test:gulp test
}
}
我想我可以在另一个模块中使用我的模块:
$ b
-
npm install github:myorg / webapp-module-storage#master
但是,当我安装我的模块时,出现此错误:
未找到本地gulp
尝试运行:npm install gulp
截图
<即时g src =https://i.stack.imgur.com/GLe0v.jpgalt =在这里输入图片描述>
我的理解是, gulp
与我的模块一起发货,因为我在 devDependencies
中声明它,但它看起来像我的 npm postinstall
脚本找不到 gulp
。
我是否缺少某些东西?
尝试运行 npm link gulp
在您的应用程序目录中(以创建一个到全球安装的Gulp模块的本地链接)。 I created a module (webapp-module-storage
) which has the following definitions:
package.json
{
"dependencies": {
...
},
"devDependencies": {
"gulp": "^3.9.1",
...
},
"name": "webapp-module-storage",
"scripts": {
"postinstall": "gulp build",
"test": "gulp test"
}
}
I thought I can use my module inside another module when installing it with:
npm install github:myorg/webapp-module-storage#master
However, when I install my module, I am getting this error:
Local gulp not found
Try running: npm install gulp
Screenshot
My understanding is, that gulp
is shipped together with my module because I declared it in devDependencies
but it looks like that my npm postinstall
script cannot find gulp
.
Am I missing something?
Try running npm link gulp
in your application directory (to create a local link to the globally installed Gulp module).
这篇关于未找到本地gulp(尝试运行:npm install gulp)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!