When I am trying to deploy my react chat project which is not based on backend and doesnt go into complications of web sockets and simply uses dummy data from another js file, the code of the app.js file is visible on the web page and the project doesnt get deployed properly. However, their is no complication shown by vercel. The only suspicious thing is my deployment link, it appears unusual, as I have deployed one more basic react project on vercel in past. Also, vercel doesnt automatically detect my project as a react project while trying to deploy it And never deploys when I choose create react app as my framework preset.Images:- The difference in the appearance of my project on vercelThis is how the project looks after deployment
I tried to deploy the app directly by just choosing my github repository of the project in vercel. But it didnt deploy my project properly even though it didnt show any error....
After knowing that my project missed a package.json file, I corrected it but now vercel has thrown new errors that I am listing below. I dont know whats wrong. Please help. I am giving all the details below....
Running build in Washington, D.C., USA (East) – iad1
Cloning github.com/gyanshivam/React-Chat-App (Branch: main, Commit: cfab724)
Previous build cache not available
Warning: Failed to fetch one or more git submodules
Cloning completed: 493.284ms
Running "vercel build"
Vercel CLI 34.1.3
Installing dependencies...
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
added 1449 packages in 26s
203 packages are looking for funding
run npm fund for details
npm notice
npm notice New minor version of npm available! 10.5.0 -> 10.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.6.0
npm notice Run npm install -g [email protected] to update!
npm notice
Detected package-lock.json generated by npm 7+
Running "npm run build"
[email protected] build react-scripts build Could not find a required file. Name: index.js Searched in: /vercel/path0/src Error: Command "npm run build" exited with 1