Home > Net >  How can i solve this problem in react.js?
How can i solve this problem in react.js?

Time:09-30

Black@DESKTOP-N04CDRI MINGW64 /c/web devlopment/react-chat-application/chat-application (master) $ npm start

[email protected] start C:\web devlopment\react-chat-application\chat-application react-scripts start

Could not find a required file. Name: index.js Searched in: C:\web devlopment\react-chat-application\chat-application\src npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: react-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start 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\Black\AppData\Roaming\npm-cache_logs\2021-09-29T15_56_51_774Z-debug.log

Black@DESKTOP-N04CDRI MINGW64 /c/web devlopment/react-chat-application/chat-application (master) $

CodePudding user response:

you may have deleted index.js file or renamed it.if you are using react-create-app pipeline then you can't rename that or remove this file so make sure it's present in your src folder inside project dir and if you are using git then run git status it will tell you what you had changed.

CodePudding user response:

index.html has been moved/removed from the /public directory

Does your project have an index.js file in the public directory?

If not you can get the one that Create React App uses here

  • Related