我在网上搜索了解决方案,但找不到。我是 Node.js 的新手,到目前为止,我安装的任何模块都没有任何问题。
直到昨天当我搜索 node.js 的 xml 模块时,它才开始给我一个问题。
我已经更新了 net framework sdk 并做了需要的操作,卸载了节点并再次安装它,但仍然没有解决方案。
我要安装的模块是 xml2json (npm install xml2json),这是错误:
编码:
C:\Program Files (x86)\EasyPHP-12.1\www\MyFirstProject\server>npm install xml2js
on
npm WARN package.json server@0.0.1 No repository field.
npm WARN package.json server@0.0.1 No README data
npm http GET https://registry.npmjs.org/xml2json
npm http 304 https://registry.npmjs.org/xml2json
npm http GET https://registry.npmjs.org/node-expat/2.0.0
npm http 304 https://registry.npmjs.org/node-expat/2.0.0
> node-expat@2.0.0 install C:\Program Files (x86)\EasyPHP-12.1\www\MyFirstProjec
t\server\node_modules\xml2json\node_modules\node-expat
> node-gyp rebuild
C:\Program Files (x86)\EasyPHP-12.1\www\MyFirstProject\server\node_modules\xml2j
son\node_modules\node-expat>node "C:\Program Files\nodejs\node_modules\npm\bin\n
ode-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:980:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:
34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files (x86)\EasyPHP-12.1\www\MyFirstProject\server\node_
modules\xml2json\node_modules\node-expat
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0