eugeneCN / vue-electron-music

vue、electron纯前端技术制作网易云音乐客户端
323 stars 82 forks source link

在主目录下 运行 npm i 报错 #11

Closed persilee closed 6 years ago

persilee commented 6 years ago

在主目录下 运行 npm inode-gyp rebuild 的时候报错,如下

> nslog@3.0.0 install /Users/lishaoying/Desktop/electron-vue-music/vue-electron-music/node_modules/nslog
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/Cellar/node/9.4.0/bin/node',
gyp verb cli   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'rebuild' ]
gyp info using node-gyp@3.6.2
gyp info using node@9.4.0 | darwin | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:166:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:166:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12)\n    at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19)\n    at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)\n    at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16\n    at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5\n    at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:166:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /usr/bin/python
gyp verb check python version `/usr/bin/python -c "import platform; print(platform.python_version());"` returned: "2.7.10\n"
gyp verb get node dir no --target version specified, falling back to host node version: 9.4.0
gyp verb command install [ '9.4.0' ]
gyp verb install input version string "9.4.0"
gyp verb install installing version: 9.4.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 0
gyp verb needs "installVersion" 9
gyp verb install version is no good; reinstalling
gyp verb ensuring nodedir is created /Users/lishaoying/.node-gyp/9.4.0
gyp http GET https://nodejs.org/download/release/v9.4.0/node-v9.4.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v9.4.0/node-v9.4.0-headers.tar.gz
gyp verb extracted file from tarball include/node/android-ifaddrs.h
gyp verb extracted file from tarball include/node/common.gypi
gyp verb extracted file from tarball include/node/config.gypi
gyp verb extracted file from tarball include/node/node.h
gyp verb extracted file from tarball include/node/node_api.h
gyp verb extracted file from tarball include/node/node_api_types.h
gyp verb extracted file from tarball include/node/node_buffer.h
gyp verb extracted file from tarball include/node/node_object_wrap.h
gyp verb extracted file from tarball include/node/node_version.h
gyp verb extracted file from tarball include/node/pthread-barrier.h
gyp verb extracted file from tarball include/node/stdint-msvc2008.h
gyp verb extracted file from tarball include/node/tree.h
gyp verb extracted file from tarball include/node/uv-aix.h
gyp verb extracted file from tarball include/node/uv-bsd.h
gyp verb extracted file from tarball include/node/uv-darwin.h
gyp verb extracted file from tarball include/node/uv-errno.h
gyp verb extracted file from tarball include/node/uv-linux.h
gyp verb extracted file from tarball include/node/uv-os390.h
gyp verb extracted file from tarball include/node/uv-posix.h
gyp verb extracted file from tarball include/node/uv-sunos.h
gyp verb extracted file from tarball include/node/uv-threadpool.h
gyp verb extracted file from tarball include/node/uv-unix.h
gyp verb extracted file from tarball include/node/uv-version.h
gyp verb extracted file from tarball include/node/uv-win.h
gyp verb extracted file from tarball include/node/uv.h
gyp verb extracted file from tarball include/node/v8-debug.h
gyp WARN install got an error, rolling back install
gyp verb command remove [ '9.4.0' ]
gyp verb remove using node-gyp dir: /Users/lishaoying/.node-gyp
gyp verb remove removing target version: 9.4.0
gyp verb remove removing development files for version: 9.4.0
gyp verb content checksum node-v9.4.0-headers.tar.gz 11c97f94937825ebf5a0c6a28a8929095a9879638c5eb5b88bf4eb1562361d06
gyp ERR! configure error 
gyp ERR! stack Error: read ECONNRESET
gyp ERR! stack     at _errnoException (util.js:1003:13)
gyp ERR! stack     at TLSWrap.onread (net.js:620:25)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/Cellar/node/9.4.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/lishaoying/Desktop/electron-vue-music/vue-electron-music/node_modules/nslog
gyp ERR! node -v v9.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
persilee commented 6 years ago

终于成功了,原来是我的python有问题,重装了就好了😝 ,已给star。