在弹性beantalk上部署需要babbel的应用程序?

时间:2020-10-10 14:04:46

标签: amazon-web-services amazon-elastic-beanstalk babeljs next.js

我正在尝试在弹性beantalk上部署nextjs应用程序。我几乎被困住了,因为那里没有任何好的资源。我不确定自己是否做得对。我在日志中看到的第一个错误是:

Oct 10 13:46:29 ip-172-31-37-122 web: ./node_modules/next/dist/client/next.js
Oct 10 13:46:29 ip-172-31-37-122 web: Error: Cannot find module 'babel-plugin-inline-react-svg' from '/var/app/current'
Oct 10 13:46:29 ip-172-31-37-122 web: at Array.map (<anonymous>)
Oct 10 13:46:29 ip-172-31-37-122 web: > Build error occurred
Oct 10 13:46:29 ip-172-31-37-122 web: Error: > Build failed because of webpack errors
Oct 10 13:46:29 ip-172-31-37-122 web: at build (/var/app/current/node_modules/next/dist/build/index.js:15:918)
Oct 10 13:46:29 ip-172-31-37-122 web: npm ERR! code ELIFECYCLE
Oct 10 13:46:29 ip-172-31-37-122 web: npm ERR! errno 1
Oct 10 13:46:29 ip-172-31-37-122 web: npm ERR! with-react-intl@1.0.0 build: `npm run extract:i18n && npm run compile:i18n && next build && tsc -p tsconfig.server.json`
Oct 10 13:46:29 ip-172-31-37-122 web: npm ERR! Exit status 1

我什至不确定是否可以在Elastic Beanstalk环境中简单地安装像这样的babel插件。服务器上的映像应该安装了Node 12版本-仅此而已。我可能需要其他依赖吗?我真的很感谢所有帮助!

0 个答案:

没有答案