Unable to build react app using npm run build - Exit status 2











up vote
0
down vote

favorite












I have created a react app using create-react-app, and when I first tried to build it using npm run build, it was working fine. However, after a couple of days of developing when I try to run the same command, I'm facing the following issue.



@ ./src/routes/web.js 195:0-49 390:33-44
@ ./src/App.js
@ ./src/index.js
@ multi ./src/index.js
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[2] (webpack)/buildin/global.js 489 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
+ 2 hidden modules


console when run npm run build



0 info it worked if it ends with ok
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@6.4.1
3 info using node@v10.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle client-lms@0.1.0~prebuild: client-lms@0.1.0
6 info lifecycle client-lms@0.1.0~build: client-lms@0.1.0
7 verbose lifecycle client-lms@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle client-lms@0.1.0~build: PATH: xxx
9 verbose lifecycle client-lms@0.1.0~build: CWD: D:lms-webpacklmsclient-lms
10 silly lifecycle client-lms@0.1.0~build: Args: [ '/d /s /c',
10 silly lifecycle 'rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production' ]
11 silly lifecycle client-lms@0.1.0~build: Returned: code: 2 signal: null
12 info lifecycle client-lms@0.1.0~build: Failed to exec build script
13 verbose stack Error: client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous>
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous>
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid client-lms@0.1.0
15 verbose cwd D:lms-webpacklmsclient-lms
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
18 verbose node v10.13.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
22 error Exit status 2
23 error Failed at the client-lms@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]


I've have been looking around in StackOverflow but I can't seem to find anything similar to my problem. Usually there is some kind of specific error message, but I can't see it.



{
"dependencies": {
"@babel/polyfill": "^7.0.0",
"express": "^4.16.4",
"pdfmake": "^0.1.36",
"query-string": "^6.2.0",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-loadable": "^5.5.0",
"react-redux": "^5.0.7",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "^4.0.8",
"react-rte": "^0.15.0",
"react-scripts": "^2.1.1",
"react-scrollbar": "^0.5.4",
"react-sortable-tree": "^2.3.0",
"recharts": "^1.4.1",
"redux": "^3.7.2",
"redux-devtools": "^3.4.2",
"redux-devtools-dock-monitor": "^1.1.3",
"redux-devtools-log-monitor": "^1.4.0",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"regenerator-runtime": "^0.13.1",
"source-map-explorer": "^1.6.0",
"string-format-js": "^1.0.0",
"styled-components": "^2.4.1",
"uniqid": "^5.0.3",
"xlsx": "^0.11.19"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-class-properties": "^6.24.1",
"compression-webpack-plugin": "^2.0.0",
"css-loader": "^1.0.1",
"eslint": "^5.9.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.11",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "^3.2.0",
"json-loader": "^0.5.7",
"lodash-webpack-plugin": "^0.11.5",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "^4.11.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"rimraf": "^2.6.2",
"sass-loader": "^7.1.0",
"stats-webpack-plugin": "^0.7.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.1.0",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0 --port 3000 --config ./webpack.config.js --mode development",
"build": "rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production",
}
}


Thanks in advance.










share|improve this question






















  • You have ejected your app created using create-react-app. Did you change anything in webpack configs or package.json after ejecting it? This error is related to html-webpack-plugin. github.com/jantimon/html-webpack-plugin/issues/895. It should not occur in the version you are using. Please add more details in your question
    – Abdul Rauf
    Nov 21 at 15:57

















up vote
0
down vote

favorite












I have created a react app using create-react-app, and when I first tried to build it using npm run build, it was working fine. However, after a couple of days of developing when I try to run the same command, I'm facing the following issue.



@ ./src/routes/web.js 195:0-49 390:33-44
@ ./src/App.js
@ ./src/index.js
@ multi ./src/index.js
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[2] (webpack)/buildin/global.js 489 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
+ 2 hidden modules


console when run npm run build



0 info it worked if it ends with ok
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@6.4.1
3 info using node@v10.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle client-lms@0.1.0~prebuild: client-lms@0.1.0
6 info lifecycle client-lms@0.1.0~build: client-lms@0.1.0
7 verbose lifecycle client-lms@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle client-lms@0.1.0~build: PATH: xxx
9 verbose lifecycle client-lms@0.1.0~build: CWD: D:lms-webpacklmsclient-lms
10 silly lifecycle client-lms@0.1.0~build: Args: [ '/d /s /c',
10 silly lifecycle 'rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production' ]
11 silly lifecycle client-lms@0.1.0~build: Returned: code: 2 signal: null
12 info lifecycle client-lms@0.1.0~build: Failed to exec build script
13 verbose stack Error: client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous>
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous>
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid client-lms@0.1.0
15 verbose cwd D:lms-webpacklmsclient-lms
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
18 verbose node v10.13.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
22 error Exit status 2
23 error Failed at the client-lms@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]


I've have been looking around in StackOverflow but I can't seem to find anything similar to my problem. Usually there is some kind of specific error message, but I can't see it.



{
"dependencies": {
"@babel/polyfill": "^7.0.0",
"express": "^4.16.4",
"pdfmake": "^0.1.36",
"query-string": "^6.2.0",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-loadable": "^5.5.0",
"react-redux": "^5.0.7",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "^4.0.8",
"react-rte": "^0.15.0",
"react-scripts": "^2.1.1",
"react-scrollbar": "^0.5.4",
"react-sortable-tree": "^2.3.0",
"recharts": "^1.4.1",
"redux": "^3.7.2",
"redux-devtools": "^3.4.2",
"redux-devtools-dock-monitor": "^1.1.3",
"redux-devtools-log-monitor": "^1.4.0",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"regenerator-runtime": "^0.13.1",
"source-map-explorer": "^1.6.0",
"string-format-js": "^1.0.0",
"styled-components": "^2.4.1",
"uniqid": "^5.0.3",
"xlsx": "^0.11.19"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-class-properties": "^6.24.1",
"compression-webpack-plugin": "^2.0.0",
"css-loader": "^1.0.1",
"eslint": "^5.9.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.11",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "^3.2.0",
"json-loader": "^0.5.7",
"lodash-webpack-plugin": "^0.11.5",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "^4.11.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"rimraf": "^2.6.2",
"sass-loader": "^7.1.0",
"stats-webpack-plugin": "^0.7.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.1.0",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0 --port 3000 --config ./webpack.config.js --mode development",
"build": "rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production",
}
}


Thanks in advance.










share|improve this question






















  • You have ejected your app created using create-react-app. Did you change anything in webpack configs or package.json after ejecting it? This error is related to html-webpack-plugin. github.com/jantimon/html-webpack-plugin/issues/895. It should not occur in the version you are using. Please add more details in your question
    – Abdul Rauf
    Nov 21 at 15:57















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have created a react app using create-react-app, and when I first tried to build it using npm run build, it was working fine. However, after a couple of days of developing when I try to run the same command, I'm facing the following issue.



@ ./src/routes/web.js 195:0-49 390:33-44
@ ./src/App.js
@ ./src/index.js
@ multi ./src/index.js
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[2] (webpack)/buildin/global.js 489 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
+ 2 hidden modules


console when run npm run build



0 info it worked if it ends with ok
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@6.4.1
3 info using node@v10.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle client-lms@0.1.0~prebuild: client-lms@0.1.0
6 info lifecycle client-lms@0.1.0~build: client-lms@0.1.0
7 verbose lifecycle client-lms@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle client-lms@0.1.0~build: PATH: xxx
9 verbose lifecycle client-lms@0.1.0~build: CWD: D:lms-webpacklmsclient-lms
10 silly lifecycle client-lms@0.1.0~build: Args: [ '/d /s /c',
10 silly lifecycle 'rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production' ]
11 silly lifecycle client-lms@0.1.0~build: Returned: code: 2 signal: null
12 info lifecycle client-lms@0.1.0~build: Failed to exec build script
13 verbose stack Error: client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous>
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous>
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid client-lms@0.1.0
15 verbose cwd D:lms-webpacklmsclient-lms
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
18 verbose node v10.13.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
22 error Exit status 2
23 error Failed at the client-lms@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]


I've have been looking around in StackOverflow but I can't seem to find anything similar to my problem. Usually there is some kind of specific error message, but I can't see it.



{
"dependencies": {
"@babel/polyfill": "^7.0.0",
"express": "^4.16.4",
"pdfmake": "^0.1.36",
"query-string": "^6.2.0",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-loadable": "^5.5.0",
"react-redux": "^5.0.7",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "^4.0.8",
"react-rte": "^0.15.0",
"react-scripts": "^2.1.1",
"react-scrollbar": "^0.5.4",
"react-sortable-tree": "^2.3.0",
"recharts": "^1.4.1",
"redux": "^3.7.2",
"redux-devtools": "^3.4.2",
"redux-devtools-dock-monitor": "^1.1.3",
"redux-devtools-log-monitor": "^1.4.0",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"regenerator-runtime": "^0.13.1",
"source-map-explorer": "^1.6.0",
"string-format-js": "^1.0.0",
"styled-components": "^2.4.1",
"uniqid": "^5.0.3",
"xlsx": "^0.11.19"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-class-properties": "^6.24.1",
"compression-webpack-plugin": "^2.0.0",
"css-loader": "^1.0.1",
"eslint": "^5.9.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.11",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "^3.2.0",
"json-loader": "^0.5.7",
"lodash-webpack-plugin": "^0.11.5",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "^4.11.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"rimraf": "^2.6.2",
"sass-loader": "^7.1.0",
"stats-webpack-plugin": "^0.7.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.1.0",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0 --port 3000 --config ./webpack.config.js --mode development",
"build": "rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production",
}
}


Thanks in advance.










share|improve this question













I have created a react app using create-react-app, and when I first tried to build it using npm run build, it was working fine. However, after a couple of days of developing when I try to run the same command, I'm facing the following issue.



@ ./src/routes/web.js 195:0-49 390:33-44
@ ./src/App.js
@ ./src/index.js
@ multi ./src/index.js
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[2] (webpack)/buildin/global.js 489 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
[0] 63ms -> [1] 5043ms -> factory:512ms building:291ms = 5909ms
+ 2 hidden modules


console when run npm run build



0 info it worked if it ends with ok
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using npm@6.4.1
3 info using node@v10.13.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle client-lms@0.1.0~prebuild: client-lms@0.1.0
6 info lifecycle client-lms@0.1.0~build: client-lms@0.1.0
7 verbose lifecycle client-lms@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle client-lms@0.1.0~build: PATH: xxx
9 verbose lifecycle client-lms@0.1.0~build: CWD: D:lms-webpacklmsclient-lms
10 silly lifecycle client-lms@0.1.0~build: Args: [ '/d /s /c',
10 silly lifecycle 'rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production' ]
11 silly lifecycle client-lms@0.1.0~build: Returned: code: 2 signal: null
12 info lifecycle client-lms@0.1.0~build: Failed to exec build script
13 verbose stack Error: client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous>
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous>
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid client-lms@0.1.0
15 verbose cwd D:lms-webpacklmsclient-lms
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "build"
18 verbose node v10.13.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error client-lms@0.1.0 build: `rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production`
22 error Exit status 2
23 error Failed at the client-lms@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]


I've have been looking around in StackOverflow but I can't seem to find anything similar to my problem. Usually there is some kind of specific error message, but I can't see it.



{
"dependencies": {
"@babel/polyfill": "^7.0.0",
"express": "^4.16.4",
"pdfmake": "^0.1.36",
"query-string": "^6.2.0",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-loadable": "^5.5.0",
"react-redux": "^5.0.7",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-router-redux": "^4.0.8",
"react-rte": "^0.15.0",
"react-scripts": "^2.1.1",
"react-scrollbar": "^0.5.4",
"react-sortable-tree": "^2.3.0",
"recharts": "^1.4.1",
"redux": "^3.7.2",
"redux-devtools": "^3.4.2",
"redux-devtools-dock-monitor": "^1.1.3",
"redux-devtools-log-monitor": "^1.4.0",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
"regenerator-runtime": "^0.13.1",
"source-map-explorer": "^1.6.0",
"string-format-js": "^1.0.0",
"styled-components": "^2.4.1",
"uniqid": "^5.0.3",
"xlsx": "^0.11.19"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-react": "^7.0.0",
"babel-eslint": "^10.0.1",
"babel-loader": "^8.0.4",
"babel-minify-webpack-plugin": "^0.3.1",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-transform-class-properties": "^6.24.1",
"compression-webpack-plugin": "^2.0.0",
"css-loader": "^1.0.1",
"eslint": "^5.9.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.11",
"html-webpack-inline-source-plugin": "0.0.10",
"html-webpack-plugin": "^3.2.0",
"json-loader": "^0.5.7",
"lodash-webpack-plugin": "^0.11.5",
"mini-css-extract-plugin": "^0.4.4",
"node-sass": "^4.11.0",
"optimize-css-assets-webpack-plugin": "^5.0.1",
"rimraf": "^2.6.2",
"sass-loader": "^7.1.0",
"stats-webpack-plugin": "^0.7.0",
"style-loader": "^0.23.1",
"terser-webpack-plugin": "^1.1.0",
"uglifyjs-webpack-plugin": "^2.0.1",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"scripts": {
"start": "webpack-dev-server --host 0.0.0.0 --port 3000 --config ./webpack.config.js --mode development",
"build": "rimraf dist && webpack --config ./webpack.production.config.js --progress --profile --colors --mode production",
}
}


Thanks in advance.







reactjs webpack build npm-run






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 at 15:43









Napat Krainara

1




1












  • You have ejected your app created using create-react-app. Did you change anything in webpack configs or package.json after ejecting it? This error is related to html-webpack-plugin. github.com/jantimon/html-webpack-plugin/issues/895. It should not occur in the version you are using. Please add more details in your question
    – Abdul Rauf
    Nov 21 at 15:57




















  • You have ejected your app created using create-react-app. Did you change anything in webpack configs or package.json after ejecting it? This error is related to html-webpack-plugin. github.com/jantimon/html-webpack-plugin/issues/895. It should not occur in the version you are using. Please add more details in your question
    – Abdul Rauf
    Nov 21 at 15:57


















You have ejected your app created using create-react-app. Did you change anything in webpack configs or package.json after ejecting it? This error is related to html-webpack-plugin. github.com/jantimon/html-webpack-plugin/issues/895. It should not occur in the version you are using. Please add more details in your question
– Abdul Rauf
Nov 21 at 15:57






You have ejected your app created using create-react-app. Did you change anything in webpack configs or package.json after ejecting it? This error is related to html-webpack-plugin. github.com/jantimon/html-webpack-plugin/issues/895. It should not occur in the version you are using. Please add more details in your question
– Abdul Rauf
Nov 21 at 15:57



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415671%2funable-to-build-react-app-using-npm-run-build-exit-status-2%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415671%2funable-to-build-react-app-using-npm-run-build-exit-status-2%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Sphinx de Gizeh

Dijon

Guerrita