Open mcapraro opened 7 years ago
I got the same error
Hi mcapraro,I hava fixed this program,pls use this cmd:
npm install https://github.com/mayonglei/NodeForMegaPi.git
I change dependencies--serialport from "=2.0.0" to "^3.1.2" in package.json,and everything is Okay in my testing.
ps:pls use this firmware of Megapi:https://github.com/Makeblock-official/FirmwareForMegaPi
,
DON'T use the firmware in this repo:https://github.com/Makeblock-official/Makeblock-Libraries
Good luck.
Hi,
I suggest to use latest node v6 and install serialport@2.1.2
i get this fail message:
gyp ERR! build error gyp ERR! stack Error: (/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.50-v7+
node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport
node-pre-gyp ERR! node -v v6.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.33
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/build/serialport/v2.0.0/Release/node-v48-linux-arm/serialport.node --module_name=serialport --module_path=/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/build/serialport/v2.0.0/Release/node-v48-linux-arm' (1)
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/Projects/prototype01/package.json'
npm WARN prototype01 No description
npm WARN prototype01 No repository field.
npm WARN prototype01 No README data
npm WARN prototype01 No license field.
npm WARN In serialport@2.0.0 replacing bundled version of node-pre-gyp with node-pre-gyp@0.6.33
npm ERR! Linux 4.4.50-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "megapi"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.4.50-v7+ gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/build/serialport/v2.0.0/Release/node-v48-linux-arm/serialport.node" "--module_name=serialport" "--module_path=/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/build/serialport/v2.0.0/Release/node-v48-linux-arm" gyp ERR! cwd /home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport gyp ERR! node -v v6.10.0 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/build/serialport/v2.0.0/Release/node-v48-linux-arm/serialport.node --module_name=serialport --module_path=/home/pi/Projects/prototype01/node_modules/megapi/node_modules/serialport/build/serialport/v2.0.0/Release/node-v48-linux-arm' (1) node-pre-gyp ERR! stack at ChildProcess.npm ERR! serialport@2.0.0 install:
node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the serialport@2.0.0 install script 'node-pre-gyp install --fallback-to-build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, 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 information on how to open an issue for this project with: npm ERR! npm bugs serialport npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls serialport npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /home/pi/Projects/prototype01/npm-debug.log