Node Full Stack build fail with "npm ERR!"

I implemented a full stack social media application with mern js. It works perfectly on my local. I pushed it into git, the repo contains the client and the server. I tried several times, deploying the whole app or only the server, setting command build as “npm install” or “npm install; npm run build”, or setting start build as “npm start” or “npm start index.js” several times, but neither works (In my local, I install the modules with “npm install” and run the server with “npm start”; in my script, “start” will run “nodemon index.js”). Btw, I remembered to add environment variable, but deployment still fails. I am so frustrated and could anyone help?
I have different type errors. Once it said “Exited with status 254 while running your code” and once it said “exited with status 1”, and many time the reported “npm ERR!” as in the image below. Does anyone have the same problem or have any insight about how to solve it, or anyone could help with how to check the error during the deployment? Thanks a lot!!!

I solved!!! Since my server and client are in the same repo, I need to specify the root as “server” or “client”… hope anyone who has same problem could see this post.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.