fabiorighetti - @Teppo Kurki I encountered an...
@Teppo Kurki
I encountered an error while trying to install the @signalk/n2k-debug plugin after updating to Signal K Server version 2.14.0.
Here’s the error log:
Jun 10 21:18:17 stderr: /usr/lib/node_modules/npm/node_modules/cacache/lib/verify.js:11 const pMap = require('p-map') ^ Error [ERR_REQUIRE_ESM]: require() of ES Module /usr/lib/node_modules/npm/node_modules/cacache/node_modules/p-map/index.js from /usr/lib/node_modules/npm/node_modules/cacache/lib/verify.js not supported. Instead change the require of index.js in /usr/lib/node_modules/npm/node_modules/cacache/lib/verify.js to a dynamic import() which is available in all CommonJS modules. at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/cacache/lib/verify.js:11:14) at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/cacache/lib/index.js:6:16) at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/entry.js:4:17) at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/cache/index.js:2:20) at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:7:15) at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/make-fetch-happen/lib/index.js:4:15) at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/index.js:6:15) at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/replace-info.js:1:22) at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/error-message.js:4:21) at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exit-handler.js:5:22) at module.exports (/usr/lib/node_modules/npm/lib/cli-entry.js:15:23) at module.exports (/usr/lib/node_modules/npm/lib/es6/validate-engines.js:39:10) at module.exports (/usr/lib/node_modules/npm/lib/cli.js:4:31) at Object.<anonymous> (/usr/lib/node_modules/npm/bin/npm-cli.js:2:25) { code: 'ERR_REQUIRE_ESM' } Node.js v20.5.1
Do you recommend downgrading Node or is there a fix planned for this?
11 Replies
i don't think the root cause of that error is related to n2k-debug, I would guess trying to install anything would trigger it, as the stack trace starts at npm command line tool itself
does npm work? can you for example run
npm list -g
?
if I were you i would try install Node v22, that should also reinstall npm in the hope of fixing your npmThanks for your help. I installed Node v22 and the n2k-debug plugin was successfully installed.
Now I’m trying to troubleshoot another issue, as I’m not seeing any data in the debug view.
I suspect it might be related to the data source configuration, but I’ve already redone it a few times and still haven’t had any success.
I’m using a YDWG-02 with TCP RAW. Some data appears in the Data Browser, but other data doesn’t — even though the devices seem to be listed under Sources.
Do you think @Scott Bender could help me with this as well?
What version of server do you have?
Signal K Server
version 2.14.0
Sponsor Signal K
Then that’s not the problem. Sorry, i did not quite understand your setup and what is and is not working
Thanks, @Teppo Kurki
Just to clarify my setup:
I'm using a YDWG-02 gateway configured in TCP RAW mode.
In Signal K, I added a TCP data connection to the YDWG-02 and selected the canboatjs parser.
Some data shows up in the Data Browser (like GPS and depth), but others — like autopilot PGNs — don’t, even though the engine interface appears under Sources. Also, nothing appears in the n2k-debug plugin.
I’ve reviewed the configuration several times, but I still haven’t been able to solve it.
@Scott Bender , could you help me with this as well?
The autopilot pgns are probably not supported either by n2k-signalk or canboat
The only AP pgns supported by n2k-signalk are Raymarine
You can turn on logging in the Data Connection to see the raw n2k data. That will be in log files in ~/.signalk
@Scott Bender , do you have any idea how I could solve this?

Solve what?
The simrad/navico AP stuff has not been fully reverse engineered. Some work was being done, but it’s not complete.
https://github.com/canboat/canboat/issues/309
GitHub
Reverse engineering of Navico autopilot controls · Issue #309 · c...
(A lot of) work has already been done on this by @htool, see https://github.com/htool/RaymarineAPtoFakeNavicoAutoPilot Hans' focus was to be able to use a Raymarine AP with a Navico control hea...
Thank you for helping me understand the complexity of the issue.
"I think the key point to consider — and perhaps we should feel some sympathy for the developers of Navico's MFDs — is that, despite all the mergers and acquisitions (Simrad/Robertson, B&G), each autopilot (TP32, AC-12, AC-42, and NAC-2/3) has an inconsistent set of commands. So decoding a NAC-3 will be different, for example, from decoding a Simrad TP-32 tiller pilot."