App build failed on shared hosting
When I run "npm run build" on my shared hosting server it throws an error. On my localhost the app running fine. This is the error:
[email protected] build /home/audi0910/public_html/qr-code-scanner cross-env NODE_ENV=production webpack-cli --mode=production --config webpack.config.js
clean-webpack-plugin: /home/audi0910/public_html/qr-code-scanner/dist has been removed.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: cross-env NODE_ENV=production webpack-cli --mode=production --config webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/audi0910/.npm/_logs/2020-11-06T13_10_47_218Z-debug.log
and this is the debug log:
0 info it worked if it ends with ok
1 verbose cli [ '/home/audi0910/bin/node',
1 verbose cli '/home/audi0910/bin/npm',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /home/audi0910/nodeext/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/audi0910/public_html/qr-code-scanner/node_modules/.bin:/home/audi0910/perl5/bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/cpanel/3rdparty/lib/path-bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/cpanel/composer/bin:/home/audi0910/.local/bin:/home/audi0910/bin
9 verbose lifecycle [email protected]~build: CWD: /home/audi0910/public_html/qr-code-scanner
10 silly lifecycle [email protected]~build: Args: [ '-c',
10 silly lifecycle 'cross-env NODE_ENV=production webpack-cli --mode=production --config webpack.config.js' ]
11 silly lifecycle [email protected]~build: Returned: code: 1 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: cross-env NODE_ENV=production webpack-cli --mode=production --config webpack.config.js
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.cross-env NODE_ENV=production webpack-cli --mode=production --config webpack.config.js
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Anyone have any idea what's wrong?