安装了parse.com(ParseOpenSource javascript sdk)的Node.js - 在AWS eb部署

时间:2017-02-15 20:48:23

标签: javascript node.js amazon-web-services

我正在尝试部署'添加了javascript sdk的node.js。

它在本地工作正常但每次我尝试 - eb部署 - 它我在日志中得到它

    npm ERR!     npm bugs node-express
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls node-express
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/app/current/npm-debug.log

> node-express@0.0.0 start /var/app/current
> node main.js

{ [Error: ENOENT: no such file or directory, open '.env'] errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
module.js:327
    throw err;
    ^

Error: Cannot find module 'parse/node'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/var/app/current/api/common/parse.js:3:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
...npm ERR! code ELIFECYCLE
npm ERR! node-express@0.0.0 start: `node main.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-express@0.0.0 start script 'node main.js'.
npm ERR! This is most likely a problem with the node-express package,
我曾多次尝试过 npm install express --save 是的,我也运行了npm install parse(它在本地工作正常)。

无济于事。为什么这一切都在本地工作,而不是在AWS EB上?

- 感谢任何线索。

1 个答案:

答案 0 :(得分:1)

不确定这是否会对某人有所帮助。最终我通过

解决了这个问题

&#39; npm install moduleName --save&#39;在我的所有模块上。一个接一个。

仍然不确定该网站为何在本地工作? - 祝你好运。