我陷入了一种特殊的局面。 这里粗略的构造:
它是一份 Java版网络应用程序和我的包裹。 json大致看上去:
{
"name": "project",
"version": "0.0.1",
"private": true,
"engines": {
"node": "16.17.0"
},
"scripts": {
"start": "webpack && node index.js",
"dev": "webpack --config webpack.develop.config.js && node index.js"
},
"dependencies": {
"express": "4.18.2",
},
"devDependencies": {
"eslint": "6.6.0",
"style-loader": "1.0.1",
"url-loader": "3.0.0",
"webpack": "4.41.2",
"webpack-cli": "4.7.0"
}
}
在试图用<代码>NODE_ENV在ElgalBeanstalk上部署时,没有安装这些系统(makes)。 然而,这会造成正本书的起步,造成以下错误:
Dec 20 20:03:52 ip-172-21-128-143 web: One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
Dec 20 20:03:52 ip-172-21-128-143 web: - webpack-cli (https://github.com/webpack/webpack-cli)
Dec 20 20:03:52 ip-172-21-128-143 web: The original webpack full-featured CLI.
Dec 20 20:03:52 ip-172-21-128-143 web: We will use "npm" to install the CLI via "npm install -D".
Dec 20 20:03:56 ip-172-21-128-143 web: Do you want to install webpack-cli (yes/no):
因此,我估计,或许我可以使用预射平台安装。 与此类似:
#!/usr/bin/env bash
echo "Installing webpack-cli"
npm install [email protected] [email protected]
And although I do see the hook running and seemingly installing the webpack-cli & webpack, the application fails to start with the same error message.
I am a little bit lost as to what I am missing here. Is this an order of operations issue, or a permissions thing? From what I see in the eb-engine.log it does npm install
first, THEN runs the predeploy hook, so I assumed it would have webpack installed before trying to run npm start
...
Quick Edit:
我还以<代码>---save和-D
和-g
为由,在 h内尝试指挥。