Error in driver ZWaveError: Failed to initialize the driver: core_1.shouldLogNode is not a function
See original GitHub issueChecklist:
- I am not using HomeAssistant. Or: a developer has told me to come here.
- I am not using ZWaveJS2MQTT. Or: a developer has told me to come here.
- I have checked the troubleshooting section and my problem is not described there.
- I have read the changelog problem was not mentioned there.
Describe the bug
After installing zwave-js-server and zwave-js@6.4.0, I get an error trying to run the server.
Device information
N/A
Did you change anything?
- Yes: (please describe)
- No
Did this use to work before?
- Don’t know, this is a new device
- No, it never worked anywhere
- Yes, in: (specify application with versions) 6.4.0 when installed about 4 days ago.
How are you using node-zwave-js
-
zwavejs2mqtt
(latest) docker image -
zwavejs2mqtt
(dev) docker image -
zwavejs2mqtt
Manual Docker buildnode-zwave-js
branch:zwavejs2mqtt
branch:
- ioBroker.zwave2 adapter
-
HomeAssistant
version XYZ - Pkg
- Manual Docker build
node-zwave-js
branch:zwavejs2mqtt
branch: Any beta7-beta9.
- Manually built (as described in the docs)
- Other: Manually installed with npm or yarn
To Reproduce
Steps to reproduce the behavior:
- Use npm or yarn to install the packages. Install zwave-js@6.4.0 or actually any older version. I have not tried 6.5.0.
- Start the zwave-server.
- Watch an exception.
- See error
Additional context
I am building my own zwave-js-container. I build a beta8 container about 4 days ago with the same (?) 6.4.0 and it works fine. I am building a new container, beta9 with 6.4.0 and it no longer works. It doesn’t matter whether I install 6.3.0 either.
Error in driver ZWaveError: Failed to initialize the driver: core_1.shouldLogNode is not a function
at Immediate.<anonymous> (/app/node_modules/zwave-js/src/lib/driver/Driver.ts:739:6) {
code: 5,
context: undefined,
transactionSource: undefined
}
Logfile: zwave_js.log
I notice that npm list
is showing the version 6.5.0 of zwave-js even though I installed 6.4.0, not sure if that means anything.
/app # npm list | grep zwave-js
+-- @zwave-js/server@1.0.0-beta.9
`-- zwave-js@6.4.0
+-- @zwave-js/config@6.5.0
| +-- @zwave-js/core@6.5.0 deduped
| +-- @zwave-js/shared@6.5.0 deduped
+-- @zwave-js/core@6.5.0
| +-- @zwave-js/shared@6.5.0 deduped
+-- @zwave-js/serial@6.5.0
| +-- @zwave-js/core@6.5.0 deduped
+-- @zwave-js/shared@6.5.0
If I search for shouldLogNode
in my good container vs. bad, I notice that the function used to be exported, and is not now. Again, I don’t know if that actually means anything, but it’s a difference. There was a change to this function in 6.5.0 and now it’s no longer exported. Not sure why changes there should affect an install of 6.4.0.
Bad
node_modules/@zwave-js/core/build/log/shared.js
282: shouldLogNode(nodeId) {
Good
@zwave-js/core/build/log/shared.js
25:exports.restoreSilence = exports.unsilence = exports.tagify = exports.messageRecordToLines = exports.messageToLines = exports.messageFitsIntoOneLine = exports.shouldLogNode = exports.ZWaveLogContainer = exports.ZWaveLoggerBase = exports.getNodeTag = exports.LOG_PREFIX_WIDTH = exports.LOG_WIDTH = exports.directionPrefixPadding = exports.CONTROL_CHAR_WIDTH = exports.getDirectionPrefix = exports.timestampFormat = void 0;
281:function shouldLogNode(nodeId) {
290:exports.shouldLogNode = shouldLogNode;
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
The public API didn’t change, but the internal one often breaks between releases. I guess I should configure the internal dependencies to use ~ ranges instead.
I don’t think so - 6.5.0 didn’t exist until a few hours ago. Although your comment matches my assessment that something with the prerelease versions in there was off.