无法'gulp install',导致'无法读取未定义的'apply'属性`

zpgglvta  于 2022-12-08  发布在  Gulp
关注(0)|答案(2)|浏览(163)

I have installed NVM and NPM to an EC2 instance using this guide from AWS .
I then install gulp and gulp-cli
npm install --global gulp
npm install --global gulp-cli
Then navigate to my project and run
gulp i
And I get this error
/home/ec2-user/.nvm/versions/node/v4.4.5/lib/node_modules/gulp/bin/gulp.js:129 gulpInst.start.apply(gulpInst, toRun); ^
TypeError: Cannot read property 'apply' of undefined at /home/ec2-user/.nvm/versions/node/v4.4.5/lib/node_modules/gulp/bin/gulp.js:129:19 at nextTickCallbackWith0Args (node.js:420:9) at process._tickCallback (node.js:349:13) at Function.Module.runMain (module.js:443:11) at startup (node.js:139:18) at node.js:968:3
node -v returns v4.4.5
npm -v returns 2.15.5
gulp -v returns
[13:22:47] CLI version 3.9.1
[13:22:47] Local version 4.0.0-alpha.2
I am now stuck and unsure how to get gulp i to run

noj0wjuj

noj0wjuj1#

在整个互联网上,建议的解决方案是运行npm install -g gulp-cli。起初,这对我不起作用,但在关闭并打开一个新的控制台后,它起作用了。

cuxqih21

cuxqih212#

这个错误表示gulpInst.startundefined
在没有看到你的特定配置之前,你不可能说任何具体的东西,但这里有一些关于GitHub的相关问题:

希望它能帮助你开始。

相关问题