npm install --save ons windows linux 都安装不了
windows
$ npm install ons --save
[email protected] install G:\bikeService\node_modules\ons
node-gyp rebuild
G:\bikeService\node_modules\ons>if not defined npm_config_node_gyp (node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:19)
gyp ERR! stack at PythonFinder. (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:480:16)
gyp ERR! stack at D:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:114:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd G:\bikeService\node_modules\ons
gyp ERR! node -v v7.7.1
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
npm WARN Error: EPERM: operation not permitted, scandir 'G:\bikeService\node_modules\url\node_modules'
npm WARN { Error: EPERM: operation not permitted, scandir 'G:\bikeService\node_modules\url\node_modules'
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'scandir',
npm WARN path: 'G:\bikeService\node_modules\url\node_modules' }
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "ons" "--save"
npm ERR! node v7.7.1
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ons package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ons
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ons
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! G:\bikeService\npm-debug.log
linux
npm ERR! Linux 2.6.32-504.el6.x86_64
npm ERR! argv "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/node" "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/npm" "install" "--save" "ons"
npm ERR! node v7.7.2
npm ERR! npm v4.1.2
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! Linux 2.6.32-504.el6.x86_64
npm ERR! argv "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/node" "/usr/local/nodejs/node-v7.7.2-linux-x64/bin/npm" "install" "--save" "ons"
npm ERR! node v7.7.2
npm ERR! npm v4.1.2
npm ERR! shasum check failed for /tmp/npm-26689-dade03dc/registry.npmjs.org/ons/-/ons-4.1.0.tgz
npm ERR! Expected: e07d2b95911148bcb13438f175def6445485576b
npm ERR! Actual: 721c223d8e71319e5cbbfdc0d4673b67e0d92c42
npm ERR! From: https://registry.npmjs.org/ons/-/ons-4.1.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/nodejs/node_app/bike/npm-debug.log