joshmarinacci / ElectronIDE

New web based Arduino IDE
BSD 3-Clause "New" or "Revised" License
246 stars 50 forks source link

Error: Cannot find module 'serialport' #62

Closed DaniDiaz71 closed 8 years ago

DaniDiaz71 commented 9 years ago

Hi,

I try to run ElectronIDE in Ubuntu 14.04 but I get "Error: Cannot find module 'serialport'". Thanks :)

dani@BigBoy:~/ElectronIDE$ nodejs electron inside of the master controller node version = { http_parser: '1.0', node: '0.10.25', v8: '3.14.5.9', ares: '1.10.0', uv: '0.10.23', zlib: '1.2.8', modules: '11', openssl: '1.0.1f' } os = linux LOADING SETTINGS /home/dani/ElectronIDE/settings.json ext settings = { theme: 'dark', anonymous_tracking: 'false' } settings { datapath: '/home/dani/ElectronIDE/node_modules/arduinodata/libraries', boardpath: '/home/dani/ElectronIDE/node_modules/arduinodata/boards', sketchtemplate: 'sketchtemplate.ino' } settings { datapath: '/home/dani/ElectronIDE/node_modules/arduinodata/libraries', boardpath: '/home/dani/ElectronIDE/node_modules/arduinodata/boards', sketchtemplate: 'sketchtemplate.ino', theme: 'dark', anonymous_tracking: 'false' } about to load the serial port error loading serial port { [Error: Cannot find module 'serialport'] code: 'MODULE_NOT_FOUND' } Error: Cannot find module 'serialport' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/dani/ElectronIDE/master.js:9:10) 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)

module.js:340 throw err; ^ Error: Cannot find module 'serialport' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/dani/ElectronIDE/serial.js:1:80) 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) dani@BigBoy:~/ElectronIDE$

voneiden commented 9 years ago

Did you try npm install to install the dependencies?

DaniDiaz71 commented 9 years ago

Yes I did, but same error...

egysuccess commented 8 years ago

the same here & CONFUSED

joshmarinacci commented 8 years ago

I've stopped working on this project since the official Arduino IDE is getting a lot better and will eventually have a new UI. It didn't make sense to reinvent their wheel anymore. Sorry.

DaniDiaz71 commented 8 years ago

Of course, it doesn't make sense. Thanks and regards.

Daniel.


Enviado desde el móvil

El 5/8/2015 16:03, "Josh Marinacci" notifications@github.com escribió:

I've stopped working on this project since the official Arduino IDE is getting a lot better and will eventually have a new UI. It didn't make sense to reinvent their wheel anymore. Sorry.

  • Josh

— Reply to this email directly or view it on GitHub https://github.com/joshmarinacci/ElectronIDE/issues/62#issuecomment-128007369 .

chandankrishnan commented 7 years ago

i also try change package.json

{
  "name": "nodebot",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
        "install": "node-pre-gyp install --fallback-to-build"
    },
    "binary": {
        "module_name": "nodebot",
        "module_path": "./lib/binding/",
        "host": "https://nodebot.s3-us-west-1.amazonaws.com"
    },
  "author": "Chandankrishnan",
  "dependencies": {
    "express": "^4.14.0",
    "johnny-five": "^0.8.106",
    "node-pre-gyp": "^0.6.29",
    "socket.io": "^1.4.8"
  }
}

but I have got error "serialport" module not found

chrwei commented 7 years ago

so add serialport to the dependencies.

you might also consider platformio as an arduino ide alternative as it's actually being maintained. or for a web based one, codebender.cc

chandankrishnan commented 7 years ago

I try sudo npm install serialport --save

but i have got following error bridgeit@bridgeit-yeoman:~/Documents/nodebot-sample$ sudo npm install serialport --save

serialport@4.0.1 install /home/bridgeit/Documents/nodebot-sample/node_modules/serialport node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.1/serialport-v4.0.1-node-v48-linux-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for serialport@4.0.1 and node@6.3.1 (node-v48 ABI) (falling back to source compile with node-gyp) make: Entering directory /home/bridgeit/Documents/nodebot-sample/node_modules/serialport/build' CXX(target) Release/obj.target/serialport/src/serialport.o make: g++: Command not found make: *** [Release/obj.target/serialport/src/serialport.o] Error 127 make: Leaving directory/home/bridgeit/Documents/nodebot-sample/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/lib/node_modules/npm/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:204:12) gyp ERR! System Linux 4.2.0-27-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/bridgeit/Documents/nodebot-sample/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/bridgeit/Documents/nodebot-sample/node_modules/serialport/build/Release" gyp ERR! cwd /home/bridgeit/Documents/nodebot-sample/node_modules/serialport gyp ERR! node -v v6.3.1 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bridgeit/Documents/nodebot-sample/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/bridgeit/Documents/nodebot-sample/node_modules/serialport/build/Release' (1) node-pre-gyp ERR! stack at ChildProcess. (/home/bridgeit/Documents/nodebot-sample/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:852:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) node-pre-gyp ERR! System Linux 4.2.0-27-generic node-pre-gyp ERR! command "/usr/bin/node" "/home/bridgeit/Documents/nodebot-sample/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/bridgeit/Documents/nodebot-sample/node_modules/serialport node-pre-gyp ERR! node -v v6.3.1 node-pre-gyp ERR! node-pre-gyp -v v0.6.29 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/bridgeit/Documents/nodebot-sample/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/bridgeit/Documents/nodebot-sample/node_modules/serialport/build/Release' (1) npm WARN nodebot@1.0.0 No description npm ERR! Linux 4.2.0-27-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "serialport" "--save" npm ERR! node v6.3.1 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE

npm ERR! serialport@4.0.1 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the serialport@4.0.1 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/bridgeit/Documents/nodebot-sample/npm-debug.log bridgeit@bridgeit-yeoman:~/Documents/nodebot-sample$ npm install --build-from-source=nodebot-sample npm WARN nodebot@1.0.0 No description npm ERR! Linux 4.2.0-27-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--build-from-source=nodebot-sample" npm ERR! node v6.3.1 npm ERR! npm v3.10.3 npm ERR! path /home/bridgeit/Documents/nodebot-sample/node_modules/.staging npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/home/bridgeit/Documents/nodebot-sample/node_modules/.staging' npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, mkdir '/home/bridgeit/Documents/nodebot-sample/node_modules/.staging' npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/home/bridgeit/Documents/nodebot-sample/node_modules/.staging' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! /home/bridgeit/Documents/nodebot-sample/npm-debug.log bridgeit@bridgeit-yeoman:~/Documents/nodebot-sample$ sudo npm install --build-from-source=nodebot-sample npm WARN nodebot@1.0.0 No description

chrwei commented 7 years ago

make: g++: Command not found

you dont' have g++ installed.