I would be willing to bet this problem is something simple that I'm missing.
I am attempting to install the NPM "serialport" package, however ever time I run my application I get the following error:
Uncaught Exception:
Error: Cannot find module 'serialport'
at Module._resolveFilename (module.js:470:15)
at Function.Module._resolveFilename (/usr/local/lib/node_modules/electron/dist/Electron.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.module.exports.initServerFunctionWithInterstellarDefaults (/Users/ianwise/interstellar/version1/cards/Fluid-Control-Panel/cards/Fluid-Control-Panel/serverScripts/arduinoControl.js:124:19)
at /Users/ianwise/interstellar/version1/interstellarClient/modules/serverFunctionManager.js:74:18
at /Users/ianwise/interstellar/version1/interstellarClient/node_modules/graceful-fs/graceful-fs.js:43:10
at FSReqWrap.oncomplete (fs.js:112:15)
I am using Node 6.10.3, and NPM 4.2.0. I have g++ installed and Python 2.6.9. I also have the Xcode command line tools installed and working properly, and have tried to build serial port using:
sudo npm rebuild --build-from-source
I am greeted with the following error message:
> serialport@4.0.7 install /Users/ianwise/interstellar/version1/interstellarClient/node_modules/serialport
> node-pre-gyp install --fallback-to-build
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile'
gyp ERR! stack at Error (native)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/usr/local/bin/node" "/Users/ianwise/interstellar/version1/interstellarClient/node_modules/node-gyp/bin/node-gyp.js" "clean"
gyp ERR! cwd /Users/ianwise/interstellar/version1/interstellarClient/node_modules/serialport
gyp ERR! node -v v6.10.3
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 '/usr/local/bin/node /Users/ianwise/interstellar/version1/interstellarClient/node_modules/node-gyp/bin/node-gyp.js clean' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/ianwise/interstellar/version1/interstellarClient/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:886:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 16.6.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/ianwise/interstellar/version1/interstellarClient/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/ianwise/interstellar/version1/interstellarClient/node_modules/serialport
node-pre-gyp ERR! node -v v6.10.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /Users/ianwise/interstellar/version1/interstellarClient/node_modules/node-gyp/bin/node-gyp.js clean' (1)
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "rebuild" "--build-from-source"
npm ERR! node v6.10.3
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@4.0.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@4.0.7 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! /Users/ianwise/.npm/_logs/2017-06-05T21_47_30_387Z-debug.log
I'm getting permission denied errors even with sudo?
I think I read somewhere that electron interferes with the build process somehow... I am currently using electron in my project. Then again I could be completely wrong and misinterpreted what they meant.
Does anybody have any ideas what's going on here?
via Ian Wise
No comments:
Post a Comment