charto / cxsd

Streaming XSD parser and XML parser generator with TypeScript output
MIT License
111 stars 55 forks source link

installation failure #7

Closed geoHeil closed 8 years ago

geoHeil commented 8 years ago

unfortunately I cannot install cxsd on node v5.10.1


npm install cxsd

> node-expat@2.3.13 install ....../node_modules/node-expat
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlparse.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmltok.o
  CC(target) Release/obj.target/expat/deps/libexpat/lib/xmlrole.o
  LIBTOOL-STATIC Release/libexpat.a
Usage: /Library/Frameworks/R.framework/Resources/bin/libtool [OPTION]... [MODE-ARG]...
Try 'libtool --help' for more information.
libtool:   error: unrecognised option: '-static'
make: *** [Release/libexpat.a] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/Users/geoHeil/.nvm/versions/node/v5.10.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ...../node_modules/node-expat
gyp ERR! node -v v5.10.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN schema No description
npm WARN schema No repository field.
npm WARN schema No license field.
npm ERR! Darwin 15.5.0
npm ERR! argv "..../.nvm/versions/node/v5.10.1/bin/node" "/usr/local/bin/npm" "install" "cxsd"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! node-expat@2.3.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
jjrv commented 8 years ago

What operating system are you using? The problem seems to be with installing the node-expat package. I can replace it with sax which doesn't require compiling anything, but will be a bit slower. That shouldn't really be an issue, since it will only affect initial XSD processing, not actual XML parsing.

jjrv commented 8 years ago

I guess you're on OS X... There's something strange with that environment. libtool should be in /usr/bin/libtool and not /Library/Frameworks/R.framework/Resources/bin/libtool. Can you check your path and make sure /usr/bin is before that framework? Do you have Apple's XCode or its Command Line Tools installed?

jjrv commented 8 years ago

If you've recently installed R, logging out and back in or rebooting might help. Otherwise it seems like the shell path needs fixing. You could try running:

sudo xcode-select --switch `xcode-select --print-path`

(I don't know if that makes any sense but it shouldn't hurt) or reinstalling XCode (which it sounds like might be broken at the moment). You could also ask on Ask Different why it's running libtool from such a strange place.

geoHeil commented 8 years ago

I was using node 5. something switching back to node 4.curentLTS Version solves the issue