XML transform in node.js using pure JS? - node.js

I have been trying to find a node.js based XML transform tool to replace the use of msxsl.exe or mono-xmltool.exe.
I have tried to install gulp-xslt and xsl-transform on Win8 x64 with node.js 0.12.
However both fail to install due to errors in "node_xslt" and "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
Any idea?
Thanks

You can run below command to install windows dependency tools and try again.
npm install --global --production windows-build-tools

Related

Error: socket hang up when using npm install with node.js v0.12.4

I have a problem when installing express-mail.
C:\mynode>npm install express-mail -g
-
> contextify#0.1.14 install C:\Users\Ivan\AppData\Roaming\npm\node_modules\expre
ss-mail\node_modules\juice2\node_modules\jsdom\node_modules\contextify
> node-gyp rebuild
\
//After a few minutes
C:\Users\Ivan\AppData\Roaming\npm\node_modules\express-mail\node_modules\juice2\
node_modules\jsdom\node_modules\contextify>if not defined npm_config_node_gyp (n
ode "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modul
es\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild)
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: socket hang up
gyp ERR! stack at createHangUpError (_http_client.js:215:15)
gyp ERR! stack at Socket.socketOnEnd (_http_client.js:300:23)
gyp ERR! stack at Socket.emit (events.js:129:20)
gyp ERR! stack at _stream_readable.js:908:16
gyp ERR! stack at process._tickCallback (node.js:355:11)
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:\Users\Ivan\AppData\Roaming\npm\node_modules\express-mail\node_mo
dules\juice2\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
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" "--msvs_version=2013" "install" "express-m
ail" "-g"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! contextify#0.1.14 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify#0.1.14 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 their info via:
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:\mynode\npm-debug.log
I'm using node.js v0.12.4, Python 2.7, and Windows 7 64-bit. I have set environment variables PythonPath = C:\Python27 and PYTHON = C:\Python27\python.exe. What should I do to solve this problem?

Install nodejs boilerpipe module on windows?

I am trying to install node js module for boilerpipe on windows 7. But the npm result with the following error. I have installed the node-gyp as well.
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: incorrect header check
gyp ERR! stack at Zlib._handle.onerror (zlib.js:366:17)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\Documents\Projects\xyz\node_modules\boilerpipe\node_modules\java
gyp ERR! node -v v0.12.1
gyp ERR! node-gyp -v v1.0.2
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" "boilerpipe"
npm ERR! node v0.12.1
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! java#0.4.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java#0.4.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the java 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 java
npm ERR! There is likely additional logging output above.

Can't get Sass module to install for gulp.js using node.js

I keep getting the following error when running npm install gulp-sass --save-dev
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\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.j
67:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "reb
d"
gyp ERR! cwd E:\xx\node_modules\gulp-sass\node_modules\node-sass
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
Build failed
npm ERR! node-sass#1.0.1 install: `node build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#1.0.1 install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.
"install" "gulp-sass"
npm ERR! cwd E:\xx
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
Just install gulp-ruby-sass instead.

npm install error ENOENT

I have a problem installing a number of modules with npm and node-gyp. In both cases the problem seems to rely on node-gyp build command. This is the error i always get:
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:1001:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:792:
34)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "E:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "clean" "rebuild"
gyp ERR! cwd C:\Users\mc\AppData\Roaming\npm\node_modules\opencv
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm ERR! opencv#0.6.0 preinstall: `node-gyp clean rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv#0.6.0 preinstall script.
npm ERR! This is most likely a problem with the opencv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp clean rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls opencv
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "E:\\Program Files\\nodejs\\\\node.exe" "E:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "opencv"
npm ERR! cwd E:\Node workspace\webSocket
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
what should i do?

Problems installing java module in node.js

During installation I have following error:
C:\Users\me\Desktop\myproject> npm install java
-
> java#0.4.2 install C:\Users\me\Desktop\myproject\node_modules\java
> node-gyp rebuild
C:\Users\me\Desktop\myproject\node_modules\java>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
VCBUILD : error Message: [C:\Users\me\Desktop\myproject\node_modules\java\build\binding.sln]
VCBUILD : System error : -2147154687. [C:\Users\me\Desktop\myproject\node_modules\java\build\binding.sln]
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:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\me\Desktop\myproject\node_modules\java
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! java#0.4.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the java#0.4.2 install script.
npm ERR! This is most likely a problem with the java 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 java
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "java"
npm ERR! cwd C:\Users\me\Desktop\myproject
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\me\Desktop\myproject\npm-debug.log
npm ERR! not ok code 0

Resources