My project breaks every time it wakes up from sleep

I keep getting this error every time my project wakes up from sleep and as of result my site is offline.

/opt/watcher/app-types/node/ line 51: next: command not found


Also, when I try to install any NPM package, it gives me an error.

And no matter what I do, it gives me this error (though with different path).

This issue started out of no where even though the project was not updated for almost a month.

I found unreliable fix which I have to apply manually every time the project breaks, which is every time the project wakes up. I can’t go on like this.

The error prevents the project from running, as well as it prevents me from installing NPM packages.

Here is the fixes I applied that worked but failed to fix the problem on the long run:

  1. NPM Won't Install Packages - #3 by ihack2712
  2. NPM Package won't install

I think it’s because you deleted an important package (not sure)?

No package was deleted. The error stating that “eslint” doesn’t exist occurs whenever I try to install any kind of package, even the express package.

1 Like

Very strange…

It is strange indeed.

Running the following commands somehow fixes the problem:

  1. rm -rf node_modules/ package.json (this deletes node modules and package.json)
  2. npm init -y
  3. Manually installing packages with pnpm install -/save command instead of npm.

However, as soon as my project goes to sleep and wakes up, it breaks again and I am forced to do this all over again.

could you send your package.json file? there might be something there interfering with glitch’s system.

  "name": "mysite",
  "author": "Daw588",
  "description": "my site description",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  "dependencies": {
    "next": "^12.2.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-syntax-highlighter": "^15.5.0",
    "sass": "^1.53.0",
    "sharp": "^0.30.7"
  "devDependencies": {
    "@types/react": "^18.0.14",
    "eslint": "8.17.0",
    "eslint-config-next": "12.1.6"
  "engines": {
    "node": "16.x"

I don’t really want to remix the project since it will be public. Is there a command that can reset the project?

Rewind is an option! You can excess it from Tools > Rewind (I think).

Rewind doesn’t work, it only lets me rewind to yesterday.

you could try emailing and see if they have any backups saved that can be loaded.

also why won’t you remix it? you could delete/unboost the old one (archive, unless you email glitch asking for it to be deleted) and boost the other one?

I fixed the issue by deleting the project and creating a new one.

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