今天遇到的奇怪node的问题,改了版本也无济于事,然后发现这样就可以解决
Tag:
1⃣️node-pre-gyp WARN Using needle for node-pre-gyp https download
2⃣️node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@11.10.1 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
3⃣️gyp ERR! configure error
> fsevents@1.2.7 install /Users/mac/Desktop/todolistMobx/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.10.1 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/mac/Desktop/todolistMobx/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/mac/Desktop/todolistMobx/node_modules/fsevents/build'
gyp ERR! System Darwin 18.0.0
gyp ERR! command "/Users/mac/.nvm/versions/node/v11.10.1/bin/node" "/Users/mac/.nvm/versions/node/v11.10.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/mac/Desktop/todolistMobx/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/mac/Desktop/todolistMobx/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /Users/mac/Desktop/todolistMobx/node_modules/fsevents
gyp ERR! node -v v11.10.1
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 '/Users/mac/.nvm/versions/node/v11.10.1/bin/node /Users/mac/.nvm/versions/node/v11.10.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/mac/Desktop/todolistMobx/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/mac/Desktop/todolistMobx/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/mac/Desktop/todolistMobx/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:984:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.0.0
node-pre-gyp ERR! command "/Users/mac/.nvm/versions/node/v11.10.1/bin/node" "/Users/mac/Desktop/todolistMobx/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/mac/Desktop/todolistMobx/node_modules/fsevents
node-pre-gyp ERR! node -v v11.10.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/Users/mac/.nvm/versions/node/v11.10.1/bin/node /Users/mac/.nvm/versions/node/v11.10.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/mac/Desktop/todolistMobx/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/Users/mac/Desktop/todolistMobx/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
npm WARN babel-loader@8.0.5 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN todolistMobx@1.0.0 No description
npm WARN todolistMobx@1.0.0 No repository 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
+ webpack@4.29.6
updated 1 package and audited 7243 packages in 27.688s
found 0 vulnerabilities
解决方法
sudo npm install --unsafe-perm
node-pre-gyp ERR! Completion callback never invoked!
解决方法
sudo npm install -g node-gyp