gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 05:00:15 26 4
gpt4 key购买 nike

我正在尝试使用 javascript sdk 添加“eb 部署”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 安装express --保存是的,我还运行了 npm install parse (在本地一切正常)。

没有效果。为什么这一切在本地都能发挥作用,但在 AWS EB 上却不行?

-感谢您提供任何线索。

最佳答案

不确定这是否会对某人有帮助。最终我解决了这个问题

在我的所有模块上“npm install moduleName --save”。一一。

仍然不确定为什么该网站可以在本地运行?-祝你好运。

关于javascript - 安装了 parse.com (ParseOpenSource javascript sdk) 的 Node.js - 在 AWS eb 部署上失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42259740/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com