gulp init要求本地安装,但我具有CLI版本

时间:2019-02-21 08:22:11

标签: gulp

我试图用gulp编译我的sass,但是当我尝试命令(在我的项目中)时: gulp init它给我错误消息:

Local gulp not found in ~/Desktop/templateWebsite
[09:01:31] Try running: npm install gulp

我已经安装了Gulp CLI gobaly,但仍然无法正常工作。

sudo npm install -g gulp-cli

我在Stack Overflow上找到了一些可能的解决方案,但是它们没有用。我也尝试了不同版本的gulp CLI。

我还尝试安装gulp语言环境:

sebastians-mbp:templateWebsite sebastiantramper$ sudo npm install gulp          
Password:

> fsevents@1.2.7 install /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@11.6.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib' 
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/build'
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
gyp ERR! node -v v11.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:188:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:978:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents
node-pre-gyp ERR! node -v v11.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/sebastiantramper/Desktop/templateWebsite/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
npm WARN saveError ENOENT: no such file or directory, open '/Users/sebastiantramper/Desktop/templateWebsite/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/sebastiantramper/Desktop/templateWebsite/package.json'
npm WARN templateWebsite No description
npm WARN templateWebsite No repository field.
npm WARN templateWebsite No README data
npm WARN templateWebsite No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ gulp@4.0.0

0 个答案:

没有答案