React-App - Error while doing npm run build - node.js

I'm having this problem when I do npm run build for production:
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/axios-token-interceptor/index.js:19
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myanmar-club-web-app#0.1.0 build: `react-app-rewired build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myanmar-club-web-app#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It was fine when I run locally.
Anyone know how to solve it?

Related

webpack cli Error - You must compile JS to extract vendor code

bone#bone:/home/webb/fishy$ npm run prod
> # prod /home/webb/fishy
> npm run production
> # production /home/webb/fishy
> mix --production
[webpack-cli] Error: You must compile JS to extract vendor code
at Extract.webpackEntry (/home/webb/fishy/node_modules/laravel-mix/src/components/Extract.js:46:19)
at /home/webb/fishy/node_modules/laravel-mix/src/components/ComponentRegistrar.js:112:53
at /home/webb/fishy/node_modules/laravel-mix/src/Dispatcher.js:39:62
at Array.map (<anonymous>)
at Dispatcher.fire (/home/webb/fishy/node_modules/laravel-mix/src/Dispatcher.js:39:47)
at Mix.dispatch (/home/webb/fishy/node_modules/laravel-mix/src/Mix.js:248:32)
at WebpackConfig.buildEntry (/home/webb/fishy/node_modules/laravel-mix/src/builder/WebpackConfig.js:62:24)
at WebpackConfig.build (/home/webb/fishy/node_modules/laravel-mix/src/builder/WebpackConfig.js:27:20)
at Mix.build (/home/webb/fishy/node_modules/laravel-mix/src/Mix.js:89:35)
at module.exports (/home/webb/fishy/node_modules/laravel-mix/setup/webpack.config.js:16:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # production: `mix --production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # production 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/free/.npm/_logs/2022-12-14T13_08_33_629Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! # prod: `npm run production`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the # prod 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/free/.npm/_logs/2022-12-14T13_08_33_652Z-debug.log
Newbie here.Excuse my ignorance.first time to install npm.Someone knows or can explain what errors is all about?
my env:
Ubuntu 20.04 LTS
node - v14.15.5
npm - v6.14.11
php - v7.4.3
composer - 2.4.4
laravel const VERSION = '6.18.15'

Fail to run AWS pipeline after merging to development environment from bitbucket

I'm having issues to run the a pipeline in AWS successfully. The flow fails in the CodeBuild phase of AWS.
I thought it was due to the .npm installation but I double checked and that is ok.
Please find below the tail log.
Thank you!
Build failed because of webpack errors
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tokyo-white-nextjs-admin-dashboard#3.0.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tokyo-white-nextjs-admin-dashboard#3.0.0 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! /root/.npm/_logs/2022-04-26T08_22_32_253Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tokyo-white-nextjs-admin-dashboard#3.0.0 build-prod: `npm run clean && npm run build && npm run export`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tokyo-white-nextjs-admin-dashboard#3.0.0 build-prod 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! /root/.npm/_logs/2022-04-26T08_22_32_267Z-debug.log
[Container] 2022/04/26 08:22:32 Command did not exit successfully npm run build-prod exit status 1
[Container] 2022/04/26 08:22:32 Phase complete: BUILD State: FAILED
[Container] 2022/04/26 08:22:32 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npm run build-prod. Reason: exit status 1
[Container] 2022/04/26 08:22:32 Entering phase POST_BUILD

Getting error Failed to minify the code from this file

I am getting following error while trying to create build of react application
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/asn1.js/lib/asn1/base/node.js:282
Read more here:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! atlas#2.0.0 staging: `env-cmd -f .env.staging react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the atlas#2.0.0 staging 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/user/.npm/_logs/2021-09-24T06_00_59_644Z-debug.log

Failed to start npm start

I am trying to run my React project, but I am not able to run it. The project contains typescript enabled with eslint. I tried to solve the issue with the help of previously asked questions Question, but that did not work for me.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! slipstream-frontend#0.3.0 lint: `eslint --ext js,ts,tsx src`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the slipstream-frontend#0.3.0 lint 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! C:\Users\ROHIT AGGARWAL\AppData\Roaming\npm-cache\_logs\2020-10-12T06_02_13_786Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! slipstream-frontend#0.3.0 prestart: `npm run lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the slipstream-frontend#0.3.0 prestart 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! C:\Users\ROHIT AGGARWAL\AppData\Roaming\npm-cache\_logs\2020-10-12T06_02_15_471Z-debug.log
I have tried to delete package.json file and then
npm cache clean
npm install
That didn't worked for me.
Yes this might happen,
Start with commands in terminal
npm unit react-app app_name
cd app_name
npm start

How to find an unknown error in create-react-app build?

I am receiving the following error when trying to build my react app. The error isnt exactly clear. When I run npm start I have no issues with the app. Npm test shows no errors or warnings.
Creating an optimized production build...
Failed to compile.
Expected an attribute.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-firebase-authentication#0.1.1 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-firebase-authentication#0.1.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above
Node and NPM are up to date. I am able to build other apps I am working on. Not sure where to begin with this error.

Resources