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

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.

Related

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

npm ERR! failed at the myfrontend#3.3.0 build script

I just got a new laptop for work, and trying to set it up for work. As I tried to run a service-build in my terminal as the command of
"./data-management/run_update_version && docker-compose -f docker-compose/docker-compose.yml build"
I got the error as below.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myfrontend#3.3.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myfrontend#3.3.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/2020-11-23T06_10_10_366Z-debug.log
I have tried many solutions such as clean cache, redo the npm install, but none of them worked. Can anyone please help.
So apparently, I figured out that this error means that there is no enough memory in the system. What I did is to go into docker desktop setting, and increase the memory, and that solved everything.

Deploying react to github

Im trying to deploy my react application to github pages from node.js.
But when i run npm run deploy I get this error
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! markdown-previewer#0.1.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the markdown-previewer#0.1.0 deploy 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\sherw\AppData\Roaming\npm-cache\_logs\2020-08-29T14_46_53_628Z-debug.log
I followed some tutorials to do this, but almost all of them had the same steps which i followed correctly.
Am i missing something here? Or is it some problem with npm?

React-App - Error while doing npm run build

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?

Error after npm run eject

I am learning how to make a mobile app using react native but every time I run in the terminal npm run eject it gives me this error at the end I tried several npm versions but I keep always getting this error
Ejected successfully!
Please consider letting us know why you ejected in this survey:
goo.gl/forms/iD6pl218r7fn9N0d2
The batch file cannot be found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hello-world2#0.1.0 eject: `react-native-scripts eject`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-world2#0.1.0 eject 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\AppData\Roaming\npm-cache\_logs\2018-06-05T11_28_47_708Z-debug.log

Resources