Welcome to Glitch! The code that tells your project to run looks for a line in your package.json scripts section like this:
"scripts": {
"start": "[thing that should happen on startup]"
},
…where the words I have between brackets are what you want to happen when your project starts up. In your project, you might want something like nodemon server & npm start --prefix client.
Two things; I think your start command should just be a string: “npm run dev”, not an array as you have right now. I suspect making that change will show you some errors in your logs. Also while you’re troubleshooting your scripts I’d suggest running them in your project’s console - it may reveal errors that get buried in the Logs pane, and might give you a little bit of as shorter feedback loop while you try to fix whatever problems crop up.
Please try running enable-pnpm in the console - we just rolled out an update to pnpm a few minutes ago and that might have put your project in a bad state temporarily.
@kgashok it looks like the problem is how you’re running pnpm install in your start script. If you’re looking to run install in the context of the package.json file in your client directory then your start command should look like
cd client && NPM_CONFIG_PRODUCTION=false pnpm install && pnpm run build
Can you give that a shot? You might need to manually fremove the .pnpm-store folder to free up that space: rm -rf .pnpm-store
You’ll also probably need to stop your start script before you remove your .pnpm-store directory, or you’ll be in a sort of race condition while your project keeps trying to install and failing. You could do this by temporarily renaming package.json to package.json.tmp, removing the .pnpm-store directory, putting the correct start script in place, and rrenaming package.json.tmp back to package.json.
Ok well you’ve resolved the disk space issue, so that’s a start.
I added && node /app/server.js to your start script to try to get your project to start up fully, but never fully starts due to errors in your /app/server.js file. Because of those errors it never gets to the line where it opens a listener to process.env.PORT. Because it never opens the listener, Glitch tries to start it over and over again, running the full command in your start script and trying to install and build your client.
I’d suggest trying to get things running in the console without doing all the initialization stuff in the start script as a place to begin. Right now I’m seeing the same error I was when I ran npm run dev in a remix; something about Cannot find module './keys_dev'. If you stop your project from continually restarting you can more easily troubleshoot your error in the console but working through them one at a time and assembling a working set of start commands as you fix things. Then you can put that command in your package.json and go from there.
Another thing I’d suggest: on Node project Glitch runs the install and start scripts in that order. You could move your initialization commands to the install script instead of start and your won’t keep retriggering the pnpm install every time your project starts.
Lastly, you could put a watch.json file in place to throttle how often install and start run and what file changes trigger those, which might help quiet the noise down.
Hopefully that will get you at least a little further and you can come back to us with more targetted questions about specific problems. Or perhaps someone else in the community can give some specigic pointers to further places to look.