0

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!

pd_uy
  • 51
  • 4

1 Answers1

1

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
Alberto
  • 4,787
  • 1
  • 13
  • 6