danielgtaylor / atom-api-blueprint-preview

Live preview API Blueprint in Atom
MIT License
43 stars 19 forks source link

Error installing api-blueprint-preview@0.5.1 #38

Closed coryt closed 3 years ago

coryt commented 9 years ago

runas@2.0.0 install C:\Users...\AppData\Local\Temp\apm-install-dir-11563-1552-1ycyxa5\node_modules\api-blueprint-preview\node_modules\pathwatcher\node_modules\runas node-gyp rebuild

C:\Users...\AppData\Local\Temp\apm-install-dir-11563-1552-1ycyxa5\node_modules\api-blueprint-preview\node_modules\pathwatcher\node_modules\runas>node "C:\Users...\AppData\Local\atom\app-1.0.0\resources\app\apm\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild

npm WARN deprecated CSSselect@0.4.1: the module is now available as 'css-select' npm WARN deprecated CSSwhat@0.4.7: the module is now available as 'css-what' gypnpm ERR! Windows_NT 6.2.9200 npm ERR! argv "C:\Users...\AppData\Local\atom\app-1.0.0\resources\app\apm\bin\node.exe" "C:\Users...\AppData\Local\atom\app-1.0.0\resources\app\apm\node_modules\npm\bin\npm-cli.js" "--globalconfig" "C:\Users....atom.apm.apmrc" "--userconfig" "C:\Users....atom.apmrc" "install" "C:\Users...\AppData\Local\Temp\d-11563-1552-1i4wqni\package.tgz" "--target=0.22.0" "--arch=ia32" npm ERR! node v0.10.35 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE

npm ERR! runas@2.0.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the runas@2.0.0 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the runas 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 runas npm ERR! There is likely additional logging output above.

danielgtaylor commented 9 years ago

@coryt have you installed node-gyp? See https://github.com/TooTallNate/node-gyp/#installation

CImrie commented 8 years ago

There seems to be a breaking change with newer versions of node for node-gyp rebuild.

I reverted to nodejs 2.5 using nvm to build that script.

For Mac

If you have homebrew installed you should do: brew install nvm

Then follow its instructions for adding it to your bash profile, then use source ~/.bash_profile

Then: nvm install iojs-v2.5

Then try sudo npm install -g aglio

Apologies, I haven't tried on Windows but hopefully the process will be similar.

iby commented 8 years ago

Getting the same thing. There's runas 3.1.1 already out that works well with latest node. I assume it's one of the dependencies that requires it and pulling the older version? Would you check if project's dependencies can be upgraded to their latests?

zenozhang26 commented 5 years ago

I met this problem yesterday, and then I found it is really a shit problem.

The answers under this issue cannot work until today, because they all found a mistake cause.

The real reason for these problem is: node-gyp package does not support python3, since it's only support python which version >=2.5.0 & <3.0.0, and there is a shit setup that gyp will use your python by a static sentence in the file "/Applications/Atom.app/Contents/Resources/app/apm/bin/python-interceptor.sh"(in macOS) or another file in Windows.

If you want to use python2, and you have more than one version of python in your computer, you may met this problem caused by node-gyp use your default 'python' in path. Meanwhile, you may have python2 command to use python2.7 or you may use another command to use python2. If you are using macOS, just open the file "python-interceptor.sh" and change "python" to "python2"(or another command you use to awake python2) in line 37 and line 40, then gyp will use your python2.7 which python version gyp supports. If you are using Windows, I recommend you to watch the log from apm, to see where the python-interceptor file is(I can see a apm.cmd file in the same folder), and then do the same thing.

Now the problem solved, and you can install package to atom now.

My environment is:(use apm -v to see) apm 2.1.1 npm 6.2.0 node 8.9.3 x64 atom 1.31.1 python 2.7.15 git 2.10.1

node-gyp@3.0.3 nvm@0.33.11