简体   繁体   English

我试图运行sb-admin-bs4-angular2-master这是一个nodejs应用程序,当我运行npm install时出现以下错误

[英]I was trying to run sb-admin-bs4-angular2-master which is an nodejs app and getting the following error when i run npm install

enter image description here 在此输入图像描述

first i run npm install -g ts-node then i run npm install which gives me following error...no idea what to do.. when i run it by npm start ... it gives me more errors of gulp server or something 首先我运行npm install -g ts-node然后我运行npm install,这给了我以下错误...不知道该怎么做..当我通过npm start运行它...它给了我更多的gulp服务器或其他什么错误

C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (node "C:\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: Python executable "C:\Users\Raheel\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack     at failPythonVersion (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:406:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:395:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:204:7)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:827:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\node_modules\c3\node_modules\d3\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.15 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-master\npm-debug.log

C:\Users\Raheel\Downloads\SB-Admin-BS4-Angular-2-master\SB-Admin-BS4-Angular-2-m
aster>

In the first lines you can read : 在第一行中,您可以阅读:

Error: Python executable "C:\Users\Raheel\AppData\Local\Programs\Python\Python35-32\python.EXE" is v3.5.1, which is not supported by gyp.

Check that you have python 2.5 installed, seems like npm can't use python 3.x 检查你是否安装了python 2.5,好像npm不能使用python 3.x.

If I'm not wrong, you need a python version which is 2.5 or higher but lower than 3.0. 如果我没错,你需要一个2.5或更高但低于3.0的python版本。 Check npm doc for more. 检查npm doc以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM