buglabs / node-xml2json

Converts XML to JSON using node-expat
808 stars 209 forks source link

Errors in Windows #121

Closed jrock2004 closed 8 years ago

jrock2004 commented 8 years ago

I am trying to use your plugin and getting errors when trying to install. I tested that this plugin will install in linux so its something particular with windows

C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: '__pfnDliNot
ifyHook2': redefinition; different type modifiers [C:\Development\animebot\node_modules\xml2json\node_modules\node-expa
t\build\deps\libexpat\expat.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\delayimp.h(134): note: see declaration of '__pfnDliNot
  ifyHook2'
..\..\..\deps\libexpat\lib\xmlparse.c(725): warning C4311: 'type cast': pointer truncation from 'XML_Parser' to 'unsign
ed long' [C:\Development\animebot\node_modules\xml2json\node_modules\node-expat\build\deps\libexpat\expat.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.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.js:2
76: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.10586
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:\Development\animebot\node_modules\xml2json\node_modules\node-expat
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "ins
tall" "xml2json"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Development\animebot\npm-debug.log
jrock2004 commented 8 years ago

Seems to be an issue on expat side -- astro/node-expat#147

busbina commented 8 years ago

Took me forever to find the work around. http://stackoverflow.com/questions/38149603/npm-install-fails-with-error-c2373-with-vs2015-update-3

jrock2004 commented 8 years ago

@busbina that did the trick. Thank you