Failed to create an optimized build

Viewed 104

I have been building a React.JS web app but after I run the build command "npm run build" It says

"Creating an optimized production build... Failed to compile." ,

and after trying many solutions to correct it , It still occurs after running the command . also below it some more errors are occurring as -

Line 37:9: 'checkValidServiceWorker' was used before it was defined
no-use-before-define

Line 49:9: 'registerValidSW' was used before it was defined
no-use-before-define

Line 59:7: Assignment to property of function parameter 'registration'
no-param-reassign

So , can anyone help me with these errors?

0 Answers
Related