strongloops lb-ng在Windows中失败

时间:2015-02-20 09:52:10

标签: angularjs strongloop

我正在阅读教程LoopBack/Getting started part II。 一切都按预期发生,直到我来到"创建AngularJS客户端"。 当我尝试执行时(Windows 7):

  
    

lb-ng server / server.js client / js / services / lb-services.js

  

发生以下情况:

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)

我知道缺少c ++ bson扩展的事实只是一个警告...但我如何应对失踪的&#34; async&#34;模块?

你能帮帮我吗? 感谢名单!

1 个答案:

答案 0 :(得分:1)

在Linux中,我必须在继续之前手动安装异步。

$ npm install async --save

在此之后,我收到以下错误:

错误:ENOENT,没有这样的文件或目录&#39; /home/action/workspace/github-nodejs/react/loopback-getting-started/client/js/services/lb-services.js' < / p>

我创建了目录,之后一切正常。

$ mkdir client/js
$ mkdir client/js/services

$ lb-ng server/server.js client/js/services/lb-services.js