gregsqueeb / consultDash

A program to read from a Nissan Consult port and display a dashboard. This was originally meant to be run on a raspberry pi and used as a dashboard
158 stars 54 forks source link

SerialPort isnt installing with npm install serialport #5

Closed jjwallace closed 5 years ago

jjwallace commented 7 years ago

So for some reason after installing the node dependancies it pukes on serial port.

On npm serial port i get this bile all over terminal (windows 7)

`C:\apps\dash>npm install serialport

bufferutil@1.2.1 install C:\apps\dash\node_modules\bufferutil node-gyp rebuild

C:\apps\dash\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C :\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\nod e-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformTo olsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w as not found. Install the required version of Windows SDK or change the SDK ver sion in the project property pages or by right-clicking the solution and select ing "Retarget solution". [C:\apps\dash\node_modules\bufferutil\build\bufferutil .vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe fail ed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:200:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\apps\dash\node_modules\bufferutil gyp ERR! node -v v8.4.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

utf-8-validate@1.2.2 install C:\apps\dash\node_modules\utf-8-validate node-gyp rebuild

C:\apps\dash\node_modules\utf-8-validate>if not defined npm_config_node_gyp (nod e "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules \node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformTo olsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w as not found. Install the required version of Windows SDK or change the SDK ver sion in the project property pages or by right-clicking the solution and select ing "Retarget solution". [C:\apps\dash\node_modules\utf-8-validate\build\valida tion.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe fail ed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:200:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\apps\dash\node_modules\utf-8-validate gyp ERR! node -v v8.4.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok

serialport@2.1.2 install C:\apps\dash\node_modules\serialport node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok node-pre-gyp verb cli [ 'C:\Program Files\nodejs\node.exe', node-pre-gyp verb cli 'C:\apps\dash\node_modules\serialport\node_modules\ \node-pre-gyp\bin\node-pre-gyp', node-pre-gyp verb cli 'install', node-pre-gyp verb cli '--fallback-to-build' ] node-pre-gyp info using node-pre-gyp@0.6.26 node-pre-gyp info using node@8.4.0 | win32 | x64 node-pre-gyp verb command install [] node-pre-gyp info check checked for "C:\apps\dash\node_modules\serialport\build\ Release\serialport.node" (not found) node-pre-gyp http GET https://github.com/voodootikigod/node-serialport/releases/ download/2.1.2/serialport-v2.1.2-node-v57-win32-x64.tar.gz node-pre-gyp http 404 https://github.com/voodootikigod/node-serialport/releases/ download/2.1.2/serialport-v2.1.2-node-v57-win32-x64.tar.gz node-pre-gyp http Pre-built binary not available for your system, looked for htt ps://github.com/voodootikigod/node-serialport/releases/download/2.1.2/serialport -v2.1.2-node-v57-win32-x64.tar.gz (falling back to source compile with node-gyp)

node-pre-gyp verb command build [ 'rebuild' ]

C:\apps\dash\node_modules\serialport>if not defined npm_config_node_gyp (node "C :\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\nod e-gyp\bin\node-gyp.js" clean ) else (node "" clean )

C:\apps\dash\node_modules\serialport>if not defined npm_config_node_gyp (node "C :\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\nodemodules\nod e-gyp\bin\node-gyp.js" configure --fallback-to-build --module=C:\apps\dash\node modules\serialport\build\Release\serialport.node --module_name=serialport --modu le_path=C:\apps\dash\node_modules\serialport\build\Release ) else (node "" conf igure --fallback-to-build --module=C:\apps\dash\node_modules\serialport\build\Re lease\serialport.node --module_name=serialport --module_path=C:\apps\dash\node_m odules\serialport\build\Release )

C:\apps\dash\node_modules\serialport>if not defined npm_config_node_gyp (node "C :\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\nod e-gyp\bin\node-gyp.js" build --fallback-to-build --module=C:\apps\dash\node_modu les\serialport\build\Release\serialport.node --module_name=serialport --module_p ath=C:\apps\dash\node_modules\serialport\build\Release ) else (node "" build -- fallback-to-build --module=C:\apps\dash\node_modules\serialport\build\Release\se rialport.node --module_name=serialport --module_path=C:\apps\dash\node_modules\s erialport\build\Release ) Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformTo olsets\v140\Toolset.targets(36,5): error MSB8036: The Windows SDK version 8.1 w as not found. Install the required version of Windows SDK or change the SDK ver sion in the project property pages or by right-clicking the solution and select ing "Retarget solution". [C:\apps\dash\node_modules\serialport\build\serialport .vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe fail ed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:258:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces s.js:200:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallb ack-to-build" "--module=C:\apps\dash\node_modules\serialport\build\Release \serialport.node" "--module_name=serialport" "--module_path=C:\apps\dash\nod e_modules\serialport\build\Release" gyp ERR! cwd C:\apps\dash\node_modules\serialport gyp ERR! node -v v8.4.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback- to-build --module=C:\apps\dash\node_modules\serialport\build\Release\serialport. node --module_name=serialport --module_path=C:\apps\dash\node_modules\serialport \build\Release' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\apps\dash\node_modul es\serialport\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:125:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:213:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:927:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/chi ld_process.js:211:5) node-pre-gyp ERR! System Windows_NT 6.1.7601 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\apps\dash\ \node_modules\serialport\node_modules\node-pre-gyp\bin\node-pre-gyp" "insta ll" "--fallback-to-build" node-pre-gyp ERR! cwd C:\apps\dash\node_modules\serialport node-pre-gyp ERR! node -v v8.4.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.26 node-pre-gyp ERR! not ok Failed to execute 'node-gyp.cmd build --fallback-to-build --module=C:\apps\dash\ node_modules\serialport\build\Release\serialport.node --module_name=serialport - -module_path=C:\apps\dash\node_modules\serialport\build\Release' (1) npm WARN Error: EPERM: operation not permitted, scandir 'C:\apps\dash\node_modul es\serialport\node_modules\bl\node_modules' npm WARN { Error: EPERM: operation not permitted, scandir 'C:\apps\dash\node_mo dules\serialport\node_modules\bl\node_modules' npm WARN stack: 'Error: EPERM: operation not permitted, scandir \'C:\apps\da sh\node_modules\serialport\node_modules\bl\node_modules\'', npm WARN errno: -4048, npm WARN code: 'EPERM', npm WARN syscall: 'scandir', npm WARN path: 'C:\apps\dash\node_modules\serialport\node_modules\bl\no de_modules' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! serialport@2.1.2 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the serialport@2.1.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\trident\AppData\Roaming\npm-cache_logs\2017-08-17T22_48_5 5_068Z-debug.log

C:\apps\dash>`

gregsqueeb commented 7 years ago

Sorry what command are you running to get that output?

jjwallace commented 7 years ago

The error occurs on install: npm install serialport

node server.js (error) Error: Cannot find module 'serialport' at Function.Module._resolveFilename (module.js:489:15) at Function.Module._load (module.js:439:25) at Module.require (module.js:517:17) at require (internal/module.js:11:18) at Object.<anonymous> (C:\apps\dash\server.js:5:18) at Module._compile (module.js:573:30) at Object.Module._extensions..js (module.js:584:10) at Module.load (module.js:507:32) at tryModuleLoad (module.js:470:12) at Function.Module._load (module.js:462:3)

NOTE: Am running off windows 7 Lenovo not raspberry yet

gregsqueeb commented 7 years ago

Hmm, you shouldn't need to run npm install serialport. Just npm install while you are in the consultDash directory and that should install everything

matthewskippers commented 7 years ago

I had similar issue. After recompiling that package it was corrected

On 18 Aug 2017 16:03, "Greg Mathews" notifications@github.com wrote:

Hmm, you shouldn't need to run npm install serialport. Just npm install while you are in the consultDash directory and that should install everything

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gregsqueeb/consultDash/issues/5#issuecomment-323362541, or mute the thread https://github.com/notifications/unsubscribe-auth/AXlW9K_DJZmDcaxPoYf8QZXBsqRy8oGFks5sZZm3gaJpZM4O66EC .

neelpatel9 commented 6 years ago

Hi gerg,

It's been pretty nice project and well described. I am trying to get data with use of skpang PiCan2. I liked your dash, can u tell me anyway i can link up my data coming from obd2 to pican2 with the your dash.

Thank you

rafalbrz71 commented 6 years ago

I get this error at NPM install

pi@raspberrypi:~/consultDash $ npm install npm WARN package.json hello-world@ No repository field.

serialport@2.1.2 install /home/pi/consultDash/node_modules/serialport node-pre-gyp install --fallback-to-build

make: Entering directory '/home/pi/consultDash/node_modules/serialport/build' CXX(target) Release/obj.target/serialport/src/serialport.o In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../node_modules/nan/nan.h:328:47: error: 'REPLACE_INVALID_UTF8' is not a member of 'v8::String' static const unsigned kReplaceInvalidUtf8 = v8::String::REPLACE_INVALID_UTF8; ^ serialport.target.mk:84: recipe for target 'Release/obj.target/serialport/src/serialport.o' failed make: *** [Release/obj.target/serialport/src/serialport.o] Error 1 make: Leaving directory '/home/pi/consultDash/node_modules/serialport/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/share/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:809:12) gyp ERR! System Linux 4.9.35-v7+ gyp ERR! command "nodejs" "/usr/bin/node-gyp" "build" "--fallback-to-build" "--module=/home/pi/consultDash/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/pi/consultDash/node_modules/serialport/build/Release" gyp ERR! cwd /home/pi/consultDash/node_modules/serialport gyp ERR! node -v v0.10.29 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp build --fallback-to-build --module=/home/pi/consultDash/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/consultDash/node_modules/serialport/build/Release' (1) node-pre-gyp ERR! stack at ChildProcess. (/home/pi/consultDash/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:98:17) node-pre-gyp ERR! stack at maybeClose (child_process.js:755:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:822:5) node-pre-gyp ERR! System Linux 4.9.35-v7+ node-pre-gyp ERR! command "node" "/home/pi/consultDash/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/pi/consultDash/node_modules/serialport node-pre-gyp ERR! node -v v0.10.29 node-pre-gyp ERR! node-pre-gyp -v v0.6.26 node-pre-gyp ERR! not ok Failed to execute 'node-gyp build --fallback-to-build --module=/home/pi/consultDash/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/consultDash/node_modules/serialport/build/Release' (1) npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! serialport@2.1.2 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the serialport@2.1.2 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-pre-gyp install --fallback-to-build 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 Linux 4.9.35-v7+ npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! cwd /home/pi/consultDash npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/pi/consultDash/npm-debug.log npm ERR! not ok code 0 pi@raspberrypi:~/consultDash $

gregsqueeb commented 5 years ago

If you are getting errors npm installing double check that your node version is v5.12. Just double checked and if you upgrade past v5.12 the version of serialport package that I am using will not install correctly.