I wanted to run Webpack
using npm run build
but it gives an error in the Terminal
as bellow
[webpack-cli] Error: Unknown option '--module-bind'
[webpack-cli] Run 'webpack --help' to see available commands and options
Error Image
package.json
{
"name": "onboard-game-development",
"version": "1.0.0",
"description": "onboard-game-development",
"main": "app.js",
"scripts": {
"start": "npm run build && node app.js",
"build": "webpack --mode production --module-bind js=babel-loader",
"webpack-help":"webpack --help",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/tcvduc/onboard-game-development.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/tcvduc/onboard-game-development/issues"
},
"homepage": "https://github.com/tcvduc/onboard-game-development#readme",
"dependencies": {
"express": "^4.18.1",
"open": "^8.4.0",
"opn": "^6.0.0",
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2"
}
}
How can I fix this error? Thank you!