Zwavejs2mqtt: [bug] 5.0.1 Docker image fails on start up, module not found

Created on 11 Jun 2021  ·  12Comments  ·  Source: zwave-js/zwavejs2mqtt

Version

Checklist:

  • [X] I am not using HomeAssistant. Or: a developer has told me to come here.
  • [X] I have checked the troubleshooting section and my problem is not described there.
  • [X] I have read the changelog problem was not mentioned there.

Build/Run method

  • [X] Docker
  • [ ] PKG
  • [ ] Snap package
  • [ ] Manually built (git clone - yarn install - yarn run build )

zwavejs2mqtt version: 5.0.1
zwave-js version: 7.7.3

Describe the bug

Fails to start up with a module not found error.

Docker log:
2021-06-11 16:39:42 stdout }
2021-06-11 16:39:42 stdout requireStack: []
2021-06-11 16:39:42 stdout code: 'MODULE_NOT_FOUND',
2021-06-11 16:39:42 stdout  at node:internal/main/run_main_module:17:47 {
2021-06-11 16:39:42 stdout  at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
2021-06-11 16:39:42 stdout  at Function.Module._load (node:internal/modules/cjs/loader:769:27)
2021-06-11 16:39:42 stdout  at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
2021-06-11 16:39:42 stdout Error: Cannot find module '/usr/src/app/bin/www'
2021-06-11 16:39:42 stdout
2021-06-11 16:39:42 stdout ^
2021-06-11 16:39:42 stdout throw err;
2021-06-11 16:39:42 stdout node:internal/modules/cjs/loader:927

Zwave log:
None - doesn't get that far

To Reproduce

Steps to reproduce the behavior:

  1. Stop existing image (4.5.2), update to latest (docker pull zwavejs/zwavejs2mqtt:latest), restart.
  2. Start fails - see error log above.

Expected behavior

Docker can start up OK and proceed to ZWave application.

Additional context

Running on a Synology 918+. The 4.5.2 image works without error, rollback to that is successful, so this is a 5.0.1 change error.

bug

Most helpful comment

Like @ttcole1254 said the startup command has changed, seems that docker for some reason doesn't pick up the new command when pulling a new image 🤷🏼‍♂️ I didn't know about that, I'm sorry, there is actually no fix for that you just should delete your local image and then pull and it should work as expected.

All 12 comments

Same for me. I rolled back to the 5.0.0 tag with success.

Same issue with 5.0.1 while 5.0.0 seems to work correctly.

Same here, downgrade to 5.0.0 works

Same here with 5.0.1

Same here with 5.0.1 using raspberry pi 4 with ubuntu image.

For what it's worth, when I upgraded from 4.5.2 to 5.0.0 I had the same issue. If I recreated the container from scratch, aka not an upgrade, it works fine. Not sure why, but considering there's almost no configuring to do with this container, it works for me at least for now.

yeah super weird issue. rolled back to 5.0.0 started up fine. removed the 5.0.0 tag and started up :latest and it was still fine.

For what it's worth, when I upgraded from 4.5.2 to 5.0.0 I had the same issue. If I recreated the container from scratch, aka not an upgrade, it works fine. Not sure why, but considering there's almost no configuring to do with this container, it works for me at least for now.

Exact same for me. Working fine after recreating the container.

I recreated my container when upgrading from 4.5.2 to 5.0.0, and I updated that to 5.0.2 just now with no issues whatsoever. From what I can tell, the command has changed from "node bin/www" to "node server/bin/www" starting on 5.0.0. I guess simply updating from 4.5.2 to 5.0.0 without recreating it carries over that old command.

I recreated my container when upgrading from 4.5.2 to 5.0.0, and I updated that to 5.0.2 just now with no issues whatsoever. From what I can tell, the command has changed from "node bin/www" to "node server/bin/www" starting on 5.0.0. I guess simply updating from 4.5.2 to 5.0.0 without recreating it carries over that old command.

Worked for me, thanks :)

Like @ttcole1254 said the startup command has changed, seems that docker for some reason doesn't pick up the new command when pulling a new image 🤷🏼‍♂️ I didn't know about that, I'm sorry, there is actually no fix for that you just should delete your local image and then pull and it should work as expected.

Delete and new pull worked just fine, thank you

Was this page helpful?
0 / 5 - 0 ratings