[nodemon] clean exit - waiting for changes before restart

Wappler 6.1.1 | Beta Channel | Windows 11 Pro
Docker | NodeJS

Everytime I change an Environment variable inside the Server Connect Settings:

Or change some config inside the Project Settings, It restart Docker containers and then lock the the nodejs container with the next error message:

[nodemon] 3.0.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): app/**/* lib/**/* views/**/* extensions/**/* tmp/**/restart.txt
[nodemon] watching extensions: ejs,js,json
[nodemon] starting `node ./index.js`
Error: Cannot find module 'redis'
Require stack:
- /opt/node_app/lib/setup/config.js
- /opt/node_app/lib/server.js
- /opt/node_app/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/opt/node_app/lib/setup/config.js:84:30)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Module.require (node:internal/modules/cjs/loader:1225:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/node_app/lib/setup/config.js',
    '/opt/node_app/lib/server.js',
    '/opt/node_app/index.js'
  ]
}
[nodemon] clean exit - waiting for changes before restart

I already have redis activate:

In Project Settings activated too:

If I Deploy again the error message is the same.
image

Random workarounds:
-Change some setting inside the docker-compose and then deploy. After successful deploy undo change to the docker-compose and deploy again.
-Sometimes Quit Docker Desktop completely works image

Are you on the local development target?

It s the Redis module included in your package.json?

Hi, on every change inside the Server Connect Settings for environments in the package.json file all the redis references get removed:

"@socket.io/redis-adapter": "^8.2.1",
"connect-redis": "^7.1.0",
"redis": "^4.6.12",

And Docker show up the error messaje of Error: Cannot find module 'redis'.
I’ve already activated redis, even I deactivate and activate and is the same.
The new workaround is disable from here the Redis to start working again.

Do you have redis enabled for all your targets in the project targets settings? For both the Docker and Server Connect?


I have deactivated and activated, and its the same.

The only that works is deactivated Redis from here:

So you have just a local development target?

Enabling the redis there in the project settings, should actually automatically reflect the Server Connect setting. Isn’t that the case with you?

I just tried it and when enabling Redis in the development target settings, it is also enabled in the server connect setting and also added to the package.json

I’m working only in local with Docker as you can see.
When enable Redis in Project Settings, in the Server Connect Settings the Redis get activated too, and the package.json file is proper added with the redis dependencies, until here everything is OK.

Problem comes when I add a new variable into the Environments throght the Server Connect Settings. It remove all the redis entrances of redis in the package.json and it cause that Docker show error of Error: Cannot find module 'redis'.

And the workaround that make it work again is deactivate Redis from the Server Connect Settings.

I see, now I was able to replicate indeed. When saving any other server connect options, indeed like environment vars, the redis settings got lost temporally.

Will search for solution now.

1 Like

Found the problem, will be fixed in the next update

Fixed in Wappler 6.1.2

This topic was automatically closed after 32 hours. New replies are no longer allowed.