If i start my app including serialport var sp = require('serialport').SerialPort; i get an error from bindings that the bindings file could not be found. Is there a configuration error? It's a fresh install.
xxx@ubuntu:~/Arbeitsfläche/node/firstapp$ node app
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Could not load the bindings file. Tried:
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/build/Debug/serialport.node
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/build/Release/serialport.node
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/out/Debug/serialport.node
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/Debug/serialport.node
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/out/Release/serialport.node
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/Release/serialport.node
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/build/default/serialport.node
-> /home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/compiled/0.6/linux/ia32/serialport.node
at bindings (/home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/node_modules/bindings/bindings.js:82:13)
at Object.<anonymous> (/home/xxx/Arbeitsfläche/node/firstapp/node_modules/serialport/serialport.js:7:44)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:32)
at Function._load (module.js:308:12)
at Module.require (module.js:354:17)
at require (module.js:370:17)
at Object.<anonymous> (/home/xxx/Arbeitsfläche/node/firstapp/app.js:20:10)
at Module._compile (module.js:441:26)
Can you try opening a terminal to node_modules/serialport and run "node-gyp configure build". This might be a similar problem to pull request #65 which hasn't been published to npm yet.
i tried, but did not succeed, (its ubuntu 12.04 btw)
Exception: binding.gyp not found (cwd: /home/xxx/Arbeitsfläche/node/firstapp/node_modules) while trying to load binding.gyp
today i tried your guess again. I updated everything first and created a new express app and after a node-gyp configure / build in the module folder it is now running. Should i close the issue or are you interested in this?
I will close, thanks!
@joeferner - I'm having the same issue (could not load the bindings file). I'm still not sure how to resolve this. I've re-installed nodejs, I have node-gyp in my global directory and the serialport module in my app directory (myapp/node_modules/serialport)
I've tried to figure out where to run the 'node-gyp configure build' command - but everywhere I try I get back:
/usr/bin/env: node: No such file or directory
I've even tried to run this command within node_modules/serialport like @paultag notes (https://github.com/rwaldron/johnny-five/issues/58), but no dice... Does this mean there's an issue with node-gyp?
I'm working on the latest Rasbian for Pi. Any help would be greatly appreciated!
@rtilton1 You're right to run the command in the serialport module folder. This kind of sounds like you don't have node in your $PATH rather than an issue with node-serialport. What's the output of running node -v on your Pi?
@programmarchy - I just re-installed nodejs (and updated the $PATH) and now I can run the node-gyp command's. I just tried to do this within the serialport folder, but am unfortunately receiving the same bind error when I try to run my app.
node -v outputs: v0.6.19
I've got it to work on node v0.8 on a pi
On Nov 26, 2013 1:18 AM, "Robbie" [email protected] wrote:
@programmarchy https://github.com/programmarchy - I just re-installed
nodejs and now I can run the node-gyp command's. I just tried to do this
within the serialport folder, but am unfortunately receiving the same bind
error.node-v outputs: v0.6.19
—
Reply to this email directly or view it on GitHubhttps://github.com/voodootikigod/node-serialport/issues/69#issuecomment-29269960
.
I updated to node v0.10.18 and the binding error went away and the node server started. I guess it doesn't work with v0.6.19...
Hey guys,
I have a similar problem: I get this output
C:\Users\bsirur\node_modules>node -v
v0.10.23
C:\Users\bsirur\node_modules>node hello.js
C:\Users\bsirur\node_modules\bindings\bindings.js:91
throw err
^
Error: Could not locate the bindings file. Tried:
 C:\Users\bsirur\node_modules\serialport\build\serialport.node
 C:\Users\bsirur\node_modules\serialport\build\Debug\serialport.node
 C:\Users\bsirur\node_modules\serialport\build\Release\serialport.node
 C:\Users\bsirur\node_modules\serialport\out\Debug\serialport.node
 C:\Users\bsirur\node_modules\serialport\Debug\serialport.node
 C:\Users\bsirur\node_modules\serialport\out\Release\serialport.node
 C:\Users\bsirur\node_modules\serialport\Release\serialport.node
 C:\Users\bsirur\node_modules\serialport\build\default\serialport.node
 C:\Users\bsirur\node_modules\serialport\compiled\0.10.23\win32\ia32\serialp
ort.node
at bindings (C:\Users\bsirur\node_modules\bindings\bindings.js:88:9)
at Object.
:6:44)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
3:18)
at Module._compile (module.js:456:26)
--- I tried reinstalling node.js (did not work)
-- updating version (did not work)
-- I already have binding.gyp in my serial port folder
PLEASE HELP, HAVE NO IDEA WHAT TO DO
Do you have node-gyp installed globally? 'npm install -g node-gyp'
Yes i did install :) but it did not work.
I am a newbee to Javascript, so i will now be clear as to what i have done. I might a little premature, excuse me for that, i am trying to learn here.
1> So i uploaded Standardfirmata on arduino first
2> I installed node.js
3> I then downloaded all packages and finally the folder structure of my project was like this
C:\Users\bsirur\node_modules ->
.bins
bindings
colors
es6-collections
firmata
johnny-five
leapjs
node
node-gyp
serialport
ws
hello.js (app)
3> In the command prompt of node.js i now now switched to cd C:\Users\bsirur\node_modules, and then
4> node hello.js
And then i got the error i had told you above
Try installing node-gyp globally and then once that's successful - delete the serialport folder and re-install it.
I tried but did not work, I got following error while installing serial port: :(
C:\Users\bsirur\new>npm install serialport
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/serialport
npm http 304 https://registry.npmjs.org/serialport
npm http GET https://registry.npmjs.org/sf/0.1.6
npm http GET https://registry.npmjs.org/async/0.1.18
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/async/0.1.18
npm http 304 https://registry.npmjs.org/sf/0.1.6
npm http 304 https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/wordwrap
[email protected] install C:\Users\bsirur\node_modules\serialport
node-gyp rebuild
C:\Users\bsirur\node_modules\serialport>node "C:\Program Files\nodejs\node_modul
es\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild
c:\Program Files\Microsoft Visual Studio 9.0\VC\includexlocale(342): warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc [C:\Users\bsirur\node_modules\serialport\build\binding.sln]
c:\Program Files\Microsoft Visual Studio 9.0\VC\includexlocale(342): warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc [C:\Users\bsirur\node_modules\serialport\build\binding.sln]
c:\users\bsirur\node_modules\serialport\src\win\stdstring.h(1105): warning C499
6: 'std::char_traits::copy': Function call with parameters that may be un
safe - this call relies on the caller to check that the passed values are corre
ct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation o
n how to use Visual C++ 'Checked Iterators' [C:\Users\bsirur\node_modules\seria
lport\build\binding.sln]
c:\users\bsirur\node_modules\serialport\src\win\stdstring.h(1128): warning C499
6: 'std::char_traits::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are co
rrect. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentatio
n on how to use Visual C++ 'Checked Iterators' [C:\Users\bsirur\node_modules\se
rialport\build\binding.sln]
c:\users\bsirur\node_modules\serialport\src\win\stdstring.h(1105): warning C499
6: 'std::char_traits::copy': Function call with parameters that may be un
safe - this call relies on the caller to check that the passed values are corre
ct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation o
n how to use Visual C++ 'Checked Iterators' [C:\Users\bsirur\node_modules\seria
lport\build\binding.sln]
c:\users\bsirur\node_modules\serialport\src\win\stdstring.h(1128): warning C499
6: 'std::char_traits::copy': Function call with parameters that may be
unsafe - this call relies on the caller to check that the passed values are co
rrect. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentatio
n on how to use Visual C++ 'Checked Iterators' [C:\Users\bsirur\node_modules\se
rialport\build\binding.sln]
C:\Users\bsirur.node-gyp\0.10.23\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent v8::Persistent::New(v8::Ha
ndle)' [C:\Users\bsirur\node_modules\serialport\build\binding.sln]
c:\Program Files\Microsoft Visual Studio 9.0\VC\includexlocale(342): warning C
4530: C++ exception handler used, but unwind semantics are not enabled. Specify
/EHsc [C:\Users\bsirur\node_modules\serialport\build\binding.sln]
C:\Users\bsirur.node-gyp\0.10.23\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent v8::Persistent::New(v8::Ha
ndle)' [C:\Users\bsirur\node_modules\serialport\build\binding.sln]
LINK : fatal error LNK1181: cannot open input file 'C:\Users\bsirur.node-gyp\0
.10.23\node.lib' [C:\Users\bsirur\node_modules\serialport\build\binding.sln]
Project : warning PRJ0018: The following environment variables were not found:
[C:\Users\bsirur\node_modules\serialport\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.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess.handle.onexit (childprocess.js:789:
12)
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\bsirur\node_modules\serialport
gyp ERR! node -v v0.10.23
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the serialport 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 serialport
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\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "serialport"
npm ERR! cwd C:\Users\bsirur\new
npm ERR! node -v v0.10.23
npm ERR! npm -v 1.3.17
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\bsirur\new\npm-debug.log
npm ERR! not ok code 0
Hey there, thank you. i finally fixed it, it was a problem with setting path of python in visual express 2012.
Most helpful comment
Can you try opening a terminal to node_modules/serialport and run "node-gyp configure build". This might be a similar problem to pull request #65 which hasn't been published to npm yet.