【问题标题】:XML transform in node.js using pure JS?使用纯 JS 在 node.js 中进行 XML 转换?
【发布时间】:2015-04-28 19:13:50
【问题描述】:

我一直在尝试寻找一个基于 node.js 的 XML 转换工具来替代使用 msxsl.exe 或 mono-xmltool.exe。

我尝试在带有 node.js 0.12 的 Win8 x64 上安装 gulp-xslt 和 xsl-transform。 然而,由于“node_xslt”和“node-gyp”中的错误,两者都无法安装。

gyp ERR! configure error
gyp ERR! stack Error: spawn C:\tools\pyhton2 ENOENT
gyp ERR! stack     at exports._errnoException (util.js:746:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
gyp ERR! stack     at child_process.js:1137:20
gyp ERR! stack     at process._tickCallback (node.js:355:11)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\test\node_modules\xsl-transform\node_modules\node_xslt
gyp ERR! node -v v0.12.1
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "xsl-transform"
npm ERR! node v0.12.1
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     C:\test\npm-debug.log

有什么想法吗? 谢谢

【问题讨论】:

  • 在 OS X 10.10 上也会出现类似的错误
  • C:\tools\pyhton2。你确定这是正确的吗?
  • 是的。它是通过巧克力安装的。但是这个错误也发生在 OS X 10.10 上。
  • 注意错字。应该是python2
  • 我明白你的意思。然而,所有其他使用 python 的包似乎都可以正常工作。它并没有解释为什么 OS X 也会发生这种情况。不仅如此,还有很多关于 node-gyp 无法构建 node_xslt 的报告。

标签: node.js xslt node-gyp


【解决方案1】:

您可以运行下面的命令来安装windows依赖工具,然后再试一次。

npm install --global --production windows-build-tools

【讨论】:

    猜你喜欢
    • 2015-09-03
    • 2013-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-15
    • 2015-01-03
    • 1970-01-01
    相关资源
    最近更新 更多