Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Cannot build node-xmpp-bosh on windows. #56

Open
geekyme opened this Issue · 16 comments

5 participants

@geekyme

Hi there,
i'm following a tutorial on how to build a chat system and node-xmpp-bosh was recommended as a core ingredient. I'm using a windows system 32-bit. Installed node-gyp and node-expat already.

I tried to npm install node-xmpp-bosh and this is the error that i get:

C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat>npm i node-xmpp-bosh
npm WARN package.json application-name@0.0.1 No README.md file found!
npm http GET https://registry.npmjs.org/node-xmpp-bosh
npm http 304 https://registry.npmjs.org/node-xmpp-bosh
npm http GET https://registry.npmjs.org/tav
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/ltx
npm http GET https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/dns-srv
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/eventpipe
npm http GET https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/ltx
npm http 304 https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/tav
npm http 304 https://registry.npmjs.org/dns-srv
npm WARN package.json dns-srv@0.0.6 No README.md file found!
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/eventpipe
npm http 304 https://registry.npmjs.org/log4js

node-expat@1.6.1 install C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-
chat\node_modules\node-xmpp-bosh\node_modules\node-expat
node-gyp rebuild

C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat\node_modules\node-xmpp
-bosh\node_modules\node-expat>node "C:\Program Files\nodejs\node_modules\npm\bin
\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/async/0.1.15
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/async/0.1.15

ws@0.4.22 install C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat\no
de_modules\node-xmpp-bosh\node_modules\ws
node install.js

node-expat.cc
[ws v0.4.22] Attempting to compile blazing fast native extensions.
..\node-expat.cc(6): fatal error C1083: Cannot open include file: 'expat.h': No
such file or directory [C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-c
hat\node_modules\node-xmpp-bosh\node_modules\node-expat\build\node_expat.vcxpro
j]
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:219:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7600
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\shawnlim\Documents\Websites\nodeprojects\fb-chat\node_modu
les\node-xmpp-bosh\node_modules\node-expat
gyp ERR! node -v v0.8.11
gyp ERR! node-gyp -v v0.6.11
gyp ERR! not ok
[ws v0.4.22] Native code compile failed (but the module will still work):
[ws v0.4.22] The native extensions are faster, but not required.
[ws v0.4.22] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.22] On Unix, native extensions require Python, make and a C++ compiler.

[ws v0.4.22] Start npm with --ws:verbose to show compilation output (if any).
npm ERR! node-expat@1.6.1 install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the node-expat@1.6.1 install script.
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 their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "i" "node-xmpp-bosh"
npm ERR! cwd C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat\npm-debug
.log
npm ERR! not ok code 0

@dhruvbird
Owner
@geekyme

@dhruvbird i'm not sure what you mean by 'Try copying the built
copy of node-expat to the node_modules folder and try again'. I just opened my node_modules folder and saw node-expat inside already. I did not copy it in.

@nikhil-salgaonkar

@shawnlim2010 Install Python 2.7.3 and try again.

@geekyme

same problem guys...

C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat>npm install node-xmpp-
bosh
npm WARN package.json application-name@0.0.1 No README.md file found!
npm http GET https://registry.npmjs.org/node-xmpp-bosh
npm http 304 https://registry.npmjs.org/node-xmpp-bosh
npm http GET https://registry.npmjs.org/ltx
npm http GET https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/tav
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/eventpipe
npm http GET https://registry.npmjs.org/dns-srv
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/ltx
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/eventpipe
npm http 304 https://registry.npmjs.org/dns-srv
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/ws
npm WARN package.json dns-srv@0.0.6 No README.md file found!
npm http 304 https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/tav

node-expat@1.6.1 install C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-
chat\node_modules\node-xmpp-bosh\node_modules\node-expat
node-gyp rebuild

C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat\node_modules\node-xmpp
-bosh\node_modules\node-expat>node "C:\Program Files\nodejs\node_modules\npm\bin
\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/async/0.1.15
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/async/0.1.15

ws@0.4.22 install C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat\no
de_modules\node-xmpp-bosh\node_modules\ws
node install.js

[ws v0.4.22] Attempting to compile blazing fast native extensions.
node-expat.cc
..\node-expat.cc(6): fatal error C1083: Cannot open include file: 'expat.h': No
such file or directory [C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-c
hat\node_modules\node-xmpp-bosh\node_modules\node-expat\build\node_expat.vcxpro
j]
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:219:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:96:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7600
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\shawnlim\Documents\Websites\nodeprojects\fb-chat\node_modu
les\node-xmpp-bosh\node_modules\node-expat
gyp ERR! node -v v0.8.11
gyp ERR! node-gyp -v v0.6.11
gyp ERR! not ok
[ws v0.4.22] Native code compile failed (but the module will still work):
[ws v0.4.22] The native extensions are faster, but not required.
[ws v0.4.22] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.22] On Unix, native extensions require Python, make and a C++ compiler.

[ws v0.4.22] Start npm with --ws:verbose to show compilation output (if any).
npm ERR! node-expat@1.6.1 install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the node-expat@1.6.1 install script.
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 their info via:
npm ERR! npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "node-xmpp-bosh"
npm ERR! cwd C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\shawnlim\Documents\Websites\nodeprojects\fb-chat\npm-debug
.log
npm ERR! not ok code 0

@geekyme

not even with python 3.3.0

@dhruvbird
Owner

@shawnlim2010 What version of all the packages (node/python/windows/npm, etc...) are you using. If you can let me know, I'll try to get my hands on a windows machine and try it myself.

@geekyme

@dhruvbird

ejs : "version": "0.8.3"
express : "version": "3.0.0rc5
node-expat : "version": "2.0.0"
node-gyp : "version": "0.7.1"
node-xmpp-bosh : this is the one that i'm stuck at i cant install it...

i'm following this tutorial here so you can see where i'm trying to install my dependencies from. http://randomgoo.blogspot.sg/2011/07/adding-facebook-chat-to-your-nodejs.html

@geekyme

i'm also using a windows 7 32bit system

@posniewski

I'm getting the same error as @shawnlim2010.

  • Windows 7 64 bit
  • Python 2.5.2
  • node v0.8.9
  • npm 1.1.61
  • MS Visual Studio 10

The error complains that expat.h doesn't exist, and then goes on to say that the native compile failed, but that's OK. However, the entire install fails. I know nothing about NPM, but perhaps something is set as "required" when it should be "optional"?

@posniewski

Looking at package.json, I see that node-expat 1.6.1 is required. Using npm install node-expa@1.6.1 on its own, I get the same error. So, the problem is in node-expat. This was reported here: node-xmpp/node-expat#47 which has an integrated fix here: node-xmpp/node-expat#48.

The current node-expat (2.0.0) installs and builds correctly on its own. Can node-xmpp-bosh use that instead?

@dhruvbird
Owner

@posniewski Thanks for figuring out the issue. To get it working right now, you can just go ahead and change the dep. to 2.0.0 manually in the node-xmpp-bosh package.json file. We'll look into seeing if NXB is stable with node-expat 2.0.0 (it should be, and if not, will get it to that stage before the next release).

@dhruvbird
Owner

TODO: Update node-expat to 2.0.0 and test to verify correctness, stability & performance.

@dhruvbird
Owner

@posniewski Alternatively (for the time being), you can try downgrading node.js to v0.6.17 (since I know that master works on that version since that is the version I am currently on).

@dhruvbird
Owner

@posniewski @shawnlim2010 I've tested current master with node-expat v2.0.0 and it seems to be working okay. The changes are on current master. Hopefully, it should be released next week or so. Thanks for the report & the resolution. Do let me know if the current master works okay on windows.

@kalpenkcs

HI i am getting issue in windows 32 bit system.
I have installed bosh server in windows 7 32 bit system. we configure bosh server with jappix plugin in open fire.we have correctly configure all things but bosh server unable to give response it shows error like below:

TypeError: Object # has no method 'removeListeners'
at XMPPLookupService.dutil.copy.connect (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-x
mpp-bosh\src\lookup-service.js:72:38)
at XMPPProxy.dutil.copy.connect (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bosh
\src\xmpp-proxy.js:164:24)
at Object.XMPPProxyConnector.stream_add (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-x
mpp-bosh\src\xmpp-proxy-connector.js:162:9)
at BoshEventPipe.EventPipe.emit (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bosh
\node_modules\eventpipe\eventpipe.js:63:25)
at Object.StreamStore.add_stream (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bos
h\src\stream.js:184:19)
at process_bosh_request (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bosh\src\bos
h.js:130:35)
at bosh_request_handler (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bosh\src\bos
h.js:229:9)
at C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bosh\src\http-server.js:69:17
at C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bosh\node_modules\underscore\under
score.js:754:19
at IncomingMessage. (C:\Users\kalpen\AppData\Roaming\npm\node_modules\node-xmpp-bosh\

@kalpenkcs

we have installed node-xmpp-bosh 0.5.0 on windows system which has no methods to find removeListener method in srv.js.

issue solved by download another setup of node-xmpp-bosh from following link
https://github.com/dhruvbird/node-xmpp-bosh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.