i am using aws elastic beanstalk node.js
but following services are not running: web. occured
github action runs but ‘following services are not running: web’ appears
and when i link to elastic beanstalk domain, only congratulations page appear even though i use “~~/signup” or “~~/reviews”
webpack.config.js
const nodeExternals = require("webpack-node-externals");
const path = require("path");
module.exports = {
mode: "development",
context: __dirname + "/src",
entry: {
app: "../index.js",
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "main.js",
},
module: {
rules: [
{
test: /.js$/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
},
},
exclude: /node_modules/,
},
],
},
target: "node",
externalsPresets: {
node: true,
},
externals: [nodeExternals()],
};
package.json
{
"name": "cicd",
"version": "1.0.0",
"description": "Node.js",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start:dev": "nodemon --exec babel-node index.js",
"start:dist": "webpack --mode production & node ./dist/main.js",
"start": "node main.js",
"build": "webpack --mode production"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-loader": "^9.1.3",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-async-handler": "^1.2.0",
"http-status-codes": "^2.3.0",
"jsonwebtoken": "^9.0.2",
"moment": "^2.29.4",
"mysql2": "^3.6.1"
},
"devDependencies": {
"@babel/cli": "^7.22.15",
"@babel/core": "^7.22.17",
"@babel/node": "^7.22.15",
"@babel/preset-env": "^7.22.15",
"nodemon": "^3.0.1",
"swagger-autogen": "^2.23.7",
"swagger-cli": "^4.0.4",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.0",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0"
}
}
procfile
web: npm install & npm run start
New contributor
doro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.