I'm getting the below error when trying to run johnny-five on my tessel 2:
Error: Cannot find module './accelerometer'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/tmp/remote-script/node_modules/johnny-five/lib/johnny-five.js:1:152)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
I've tried installing the module but the error still appears.
Any pointers please would be greatly appreciated.
Try installing Node version 8.11.1.
It worked for me. Took two days to figure it out.
If it doesn't work, check the version the package.json is on tessel-io and johnny-five. If the node version in the package.json is different from the node version you're using, update it or downgrade it to that package.json node version.
Related
I have installed appium doctor and got it installed without error on mac. However when I used command "appium-doctor -h" to check. It gives following exception. Can you please let me know what is going wrong here:
appium-doctor -h
/usr/local/lib/node_modules/appium-doctor/build/lib/general.js:59
catch {
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/appium-doctor/lib/factory.js:3:1)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/appium-doctor/bin/appium-doctor.js:4:1)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
This issue related to the node version, please try to install the latest version of the node recommended version from below link
Node Latest Version v12.13.0
I am also facing the same issue, once upgraded to the recommended/latest version of the version node problem solved.
If not resolved post the error here will do further debugging.
Run these commands it will solve the issue:
sudo apt-get update
sudo apt-get install build-essential libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
source ~/.profile
nvm ls-remote
nvm install v12.16.2
nvm use v12.16.2
node -v
First time I got another error and follow the steps in below link
How to fix error "Could not detect Mac OS X Version from sw_vers output: '10.12 '" from Appium
After that Appium Doctor shows this error :
SyntaxError: Unexpected number
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (index.js:1:20)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (lib/xcode.js:1:42)
at Module._compile (module.js:413:34)
Please help me to resolve the issue.
I am using angular-fullstack yeoman generator and added some dependencies to my bower.json. I have then sudo npm install and bower install. Now when I run the command yo angular-fullstack:directive simple or yo angular-fullstack:filter propsFilter I get the below error:
Error: Cannot find module 'file-utils'
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.<anonymous> (/usr/local/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/lib/base.js:11:12)
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)
Try reinstalling (maybe uninstall/reinstall).
Given your trace, it looks like npm install broke and didn't install dependencies correctly. I've had this issue a lot switching to npm 3 and running install/update command over a previously installed package.
I'm trying to generate a app with generator-gulp-webapp by running yo gulp-webapp, though when I do I get the following error:
Deans-Air:deangibson deang$ sudo yo gulp-webapp
module.js:339
throw err;
^
Error: Cannot find module 'escape-string-regexp'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/node_modules/chalk/index.js:2:26)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
Deans-Air:deangibson deang$
Ran into the same issue today. I found an error cannot run in wd %s %s towards the top of the stack. Re running the $ sudo npm install -g mean-cli command with the --unsafe-perm flag fixed it for me.
Node: v0.12.2
NPM: 3.5.0
When I try to run yo app generator I get this error:
/Users/coder/.node/lib/node_modules/yo/node_modules/yeoman-environment/node_modules/inquirer/node_modules/rx/dist/rx.all.js:9229
throw e;
^
Error: Cannot find module 'yeoman-generator'
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.<anonymous> (/Users/coder/.node/lib/node_modules/generator-webapp/app/index.js:4:14)
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)
Params:
os OS X Yosemite 10.10,
yo 1.3.3,
node v0.10.32
Update npm an re-run npm install. There's probably been an issue during the installation process causing one module to not be installed.
Nothing else you can do about this.