Open euzureau opened 9 years ago
I think you have the wrong package :)
You're installing this package: https://www.npmjs.com/package/mock-api-server
This is the repository for this package: https://www.npmjs.com/package/api-mock
Apologies! I spent the morning trying to install both 'api-mock' and 'mock-api-server' to compare and contrast... but sadly was unable to install either :-(
Here's the dump from npm choking on installing api-mock.
$ npm install api-mock --save
npm WARN engine hawk@0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine hoek@0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine boom@0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine cryptiles@0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN engine sntp@0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"0.10.33","npm":"1.4.28"})
> protagonist@0.19.3 install C:\cygwin64\home\e.uzureau\dev\<snip>\node_modules\api-mock\node
_modules\protagonist
> node-gyp rebuild
C:\cygwin64\home\e.uzureau\dev<snip>\node_modules\api-mock\node_modules\protagonist>node "C:
\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:1001:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:792:34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\cygwin64\home\e.uzureau\dev<snip>\node_modules\api-mock\node_modules\protago
nist
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! protagonist@0.19.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@0.19.3 install script.
npm ERR! This is most likely a problem with the protagonist 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 their info via:
npm ERR! npm owner ls protagonist
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "api-mock"
"--save"
npm ERR! cwd C:\cygwin64\home\e.uzureau\dev\<snip>
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Sorry for that confusion!
It looks like it's protagonist that's failing to install, so you might have better luck in their issues. (I need to update this project's dependencies as well, which might help your situation if the above problem is fixed in later versions).
I wonder if you have solved the problem,but I face a similar one ,could you help me?thanks very much!
[root@localhost ~]# npm install -g api-mock npm WARN engine uri-template@1.0.0: wanted: {"node":"~0.10.4"} (current: {"node":"4.4.5","npm":"2.15.5"})
protagonist@1.2.6 install /usr/local/lib/node_modules/api-mock/node_modules/protagonist node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.4.5" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/api-mock/node_modules/protagonist/.node-gyp" gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: getaddrinfo EAI_AGAIN nodejs.org:443 gyp ERR! stack at Object.exports._errnoException (util.js:870:11) gyp ERR! stack at errnoException (dns.js:32:15) gyp ERR! stack at GetAddrInfoReqWrap.onlookup as oncomplete gyp ERR! System Linux 3.10.0-327.el7.x86_64 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/api-mock/node_modules/protagonist gyp ERR! node -v v4.4.5 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok npm ERR! Linux 3.10.0-327.el7.x86_64 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "api-mock" npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! code ELIFECYCLE
npm ERR! protagonist@1.2.6 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protagonist@1.2.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the protagonist 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 protagonist
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls protagonist
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /root/npm-debug.log
Sorry for Windows, but I'm stuck with it.
I wanted to install api-mock via npm and it's getting an error:
The closest thread I can find of others with this problem is here: https://github.com/TooTallNate/node-gyp/issues/154 (though sadly it hasn't helped to resolve my problem)
Has anyone else had this trouble?