I am going through the tutorial LoopBack/Getting started part II.
Everything is happening as expected until I come to the "Create AngularJS client".
When I try to execute (Windows 7):
lb-ng server/server.js client/js/services/lb-services.js
following happens:
C:\learn\loopbackLearn>lb-ng server/server.js client/js/services/lb-services.js
Loading LoopBack app "C:\\learn\\loopbackLearn\\server\\server.js"
{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
module.js:338
throw err;
^
Error: Cannot find module 'async'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\learn\loopbackLearn\server\boot\create-sample-mode
ls.js:1:75)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
I understand that the fact that the c++ bson extension is missing is just a warning ... but how do I cope with the missing "async" module?
Can you help me?
Thanx!
In Linux, I had to install async manually before proceed.
$ npm install async --save
After this, I got the following error:
Error: ENOENT, no such file or directory '/home/action/workspace/github-nodejs/react/loopback-getting-started/client/js/services/lb-services.js'
I created the directory and after this everything worked ok.
$ mkdir client/js
$ mkdir client/js/services
$ lb-ng server/server.js client/js/services/lb-services.js
Related
I'm excited to get started with the Particle Electron logging GPS coordinates and storing them up in the Google Cloud Platform. I have all the integrations connected using this tutorial, https://docs.particle.io/tutorials/integrations/google-cloud-platform/ l and am now getting this error trying to run the script using the instructions here: https://github.com/particle-iot/google-cloud-datastore-tutorial running the script gives me this error:
#electronmapper-1521735511351:~/google-cloud-datastore-tutorial$ node tutorial.js
Authenticating with Google Cloud...
module.js:540
throw err;
^
Error: Cannot find module 'google-cloud'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/michael_przekaza_ii/google-cloud-datastore-tutorial/tutorial.js:13:14)
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)
#electronmapper-1521735511351:~/google-cloud-datastore-tutorial$
Do you know what a module.js: 540 error is? npm updates have been unsuccessful. I've also installed dependencies. I believe I have the correct Setup Configuration. Any help would be awesome! Thanks in advance. -MP
When I am trying to start my Discord.JS BOT, it shows up this error:
root#Gabitzuu-Teo:/home/5times# node bot
module.js:538
throw err;
^
Error: Cannot find module './packets/WebSocketPacketManager'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/home/5times/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:5:23)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
root#Gabitzuu-Teo:/home/5times#
(5times - my BOT's name.)
Does MySQL break it?
It would be helpful if you could provide us with your code.
It appears you're missing a module
Error: Cannot find module './packets/WebSocketPacketManager'
If you navigate to your bots folder in your terminal you can then type npm install into your terminal and it should install all dependancies listed in your package.json
i'm trying to install this plugin : https://github.com/phonegap/phonegap-plugin-barcodescanner but the following error shows up:
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\Users\guadha.peralta\AppData\Roaming\npm\node_modules\phonegap\lib\phonegap\serve.js:9:23)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
what could be the problem?
The "arrow function" => are ES6 functions. Update node to minimum v4.4.5 which starts supporting ES6. On windows you must have installed the latest version of node, which supports that type of function.
Update node on Windows
Run PowerShell as Administrator and execute the following command:
npm install -g npm-windows-upgrade
i do encounter a problem while launching angular (yo angular):
invoke angular:controller:/usr/lib/node_modules/generator-angular/app/index.js
identical app/scripts/controllers/main.js
identical test/spec/controllers/main.js
module.js:339
throw err;
^
Error: Cannot find module './lib/_stream_passthrough.js'
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/lib/node_modules/generator-karma/node_modules/yeoman-generator/node_modules/download/node_modules/readable-stream/passthrough.js:1:80)
I have no idea how to solve it. I guess a module did not install but i don't understand the error message!
Anyone had this problem before and could help me ?
cheers
Angular v: v1.4.7
node -v : v4.2.1
I'm trying to use Yeoman with my AngularJS app, but I'm getting this error when running 'yo angular'. How do I gain permission to the directory that's throwing up this error?
Error: EACCES, permission denied '/Users/mycomputer/.config/configstore/insight-yo.yml'
You don't have access to this file.
at Object.fs.openSync (fs.js:438:18)
at Object.fs.writeFileSync (fs.js:977:15)
at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:56:8)
at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:19:11)
at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:23:34)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/cli.js:27:15)
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)
I found a solution to my problem:
sudo chown -R `whoami` /usr/local/lib/node_modules