I’ve added all my node_modules folders to .gitignore (my directory one, my backend one, and my frontend one as well) since i’ve been told that you don’t actually need to commit them with the rest of your code, but doing that i got this error below, and when i’ve tried to commit the node_modules i actually got other error, which was “sh: 1: react-scripts: Permission denied”, (i’ve added permission already, but it seems to apply only locally on my pc). So, to fix the “react-scripts: not found” i need to commit node_modules, but when i do it, i get the “react-scripts: Permission denied” error, i’m literally stuck, and i hope you guys can help me please.
Oct 25 11:32:00 AM ==> Cloning from GitHub - GustaParente/CRUD…
Oct 25 11:32:01 AM ==> Checking out commit e9e2b66e1bfa644b008499b6b27bb695d34cad48 in branch master
Oct 25 11:32:04 AM ==> Using Node version 14.17.0 (default)
Oct 25 11:32:04 AM ==> Docs on specifying a Node version: Setting Your Node.js Version | Render Docs
Oct 25 11:32:04 AM ==> Running build command ‘npm run build’…
Oct 25 11:32:04 AM
Oct 25 11:32:04 AM > teste@6.11.3 build /opt/render/project/src
Oct 25 11:32:04 AM > npm run build:frontend
Oct 25 11:32:04 AM
Oct 25 11:32:05 AM
Oct 25 11:32:05 AM > teste@6.11.3 build:frontend /opt/render/project/src
Oct 25 11:32:05 AM > cd frontend && npm run build
Oct 25 11:32:05 AM
Oct 25 11:32:05 AM
Oct 25 11:32:05 AM > frontend@6.11.3 build /opt/render/project/src/frontend
Oct 25 11:32:05 AM > react-scripts build
Oct 25 11:32:05 AM
Oct 25 11:32:05 AM sh: 1: react-scripts: not found
Oct 25 11:32:05 AM npm ERR! code ELIFECYCLE
Oct 25 11:32:05 AM npm ERR! syscall spawn
Oct 25 11:32:05 AM npm ERR! file sh
Oct 25 11:32:05 AM npm ERR! errno ENOENT
Oct 25 11:32:05 AM npm ERR! frontend@6.11.3 build: react-scripts build
Oct 25 11:32:05 AM npm ERR! spawn ENOENT
Oct 25 11:32:05 AM npm ERR!
Oct 25 11:32:05 AM npm ERR! Failed at the frontend@6.11.3 build script.
Oct 25 11:32:05 AM npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Oct 25 11:32:05 AM
Oct 25 11:32:05 AM npm ERR! A complete log of this run can be found in:
Oct 25 11:32:05 AM npm ERR! /opt/render/.cache/_logs/2023-10-25T14_32_05_644Z-debug.log
Oct 25 11:32:05 AM npm ERR! code ELIFECYCLE
Oct 25 11:32:05 AM npm ERR! errno 1
Oct 25 11:32:05 AM npm ERR! teste@6.11.3 build:frontend: cd frontend && npm run build
Oct 25 11:32:05 AM npm ERR! Exit status 1
Oct 25 11:32:05 AM npm ERR!
Oct 25 11:32:05 AM npm ERR! Failed at the teste@6.11.3 build:frontend script.
Oct 25 11:32:05 AM npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Oct 25 11:32:05 AM
Oct 25 11:32:05 AM npm ERR! A complete log of this run can be found in:
Oct 25 11:32:05 AM npm ERR! /opt/render/.cache/_logs/2023-10-25T14_32_05_667Z-debug.log
Oct 25 11:32:05 AM npm ERR! code ELIFECYCLE
Oct 25 11:32:05 AM npm ERR! errno 1
Oct 25 11:32:05 AM npm ERR! teste@6.11.3 build: npm run build:frontend
Oct 25 11:32:05 AM npm ERR! Exit status 1
Oct 25 11:32:05 AM npm ERR!
Oct 25 11:32:05 AM npm ERR! Failed at the teste@6.11.3 build script.
Oct 25 11:32:05 AM npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Oct 25 11:32:05 AM
Oct 25 11:32:05 AM npm ERR! A complete log of this run can be found in:
Oct 25 11:32:05 AM npm ERR! /opt/render/.cache/_logs/2023-10-25T14_32_05_700Z-debug.log
Oct 25 11:32:05 AM ==> Build failed