新手急问。。 gyp ERR
发布于 4天前 作者 55345249 258 次浏览 来自 问答
"C:\Program Files (x86)\JetBrains\WebStorm 10.0.4\bin\runnerw.exe" "C:\Program Files\nodejs\npm.cmd" update

> [email protected] install C:\Users\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos
> node-gyp rebuild


C:\Users\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos>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: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 10.0.10240
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\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules\mongodb
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])

Process finished with exit code 0
11 回复

需要我在windows10上,安装一个PYTHON么?

@MiguelValentine 谢谢。而且python有版本要求,高了也不行。。还得重新下载一个低版本的。。 gyp ERR! configure error gyp ERR! stack Error: Python executable “python” is v3.5.0, 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.

2.7版本的python就可以

@kiroChen 我用的2.7版的,但是又有了新问题。哎。。

“C:\Program Files (x86)\JetBrains\WebStorm 10.0.4\bin\runnerw.exe” “C:\Program Files\nodejs\npm.cmd” update

[email protected] install C:\Users\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos node-gyp rebuild

C:\Users\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos>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 ) �ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ�����ӡ�/m�����ء� C:\Users\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos\build\kerberos.vcxproj(20,3): error MSB4019: δ�ҵ��������Ŀ��C:\Microsoft.Cpp.Default.props������ȷ�� <Import> �����е�·����ȷ���Ҵ����ϴ��ڸ��ļ��� gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23) gyp ERR! stack at emitTwo (events.js:87:13) gyp ERR! stack at ChildProcess.emit (events.js:172:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Windows_NT 10.0.10240 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\55345\WebstormProjects\myblog\node_modules\mongodb\node_modules\mongodb-core\node_modules\kerberos gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN optional dep failed, continuing [email protected] [email protected] node_modules\mongodb ├── [email protected] ├── [email protected] ([email protected], [email protected], [email protected], [email protected]) └── [email protected] ([email protected])

Process finished with exit code 0

C++编译器装了吗?

@hanyuzhou2006 我放弃了windows。。

少包 换linux or装一个vs2010 express 版本也不能高。。。

我也是同样的问题,装了python2.7.9,vs2013。

G:\web\expressTest\microblog\node_modules\mongodb\node_modules\mongodb-core\node _modules\kerberos>if not defined npm_config_node_gyp (node “C:\Program Files\nod ejs\node_modules\npm\bin\node-gyp-bin\…\node_modules\node-gyp\bin\node-gyp. js” rebuild ) else (node rebuild )

到这就不动了。

重新安装 python试试,最好用Linux开发。

回到顶部