I'm encountering the following issue with installing ws for javascript node (v. 15.8.0) on a raspberrypi zero 2 w.
julius@pi:~ $ sudo npm i ws
TypeError: Class extends value #<Object> is not a constructor or null
at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/tar/lib/read-entry.js:90:4)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Module.require (node:internal/modules/cjs/loader:997:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/tar/lib/pack.js:27:19)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
/usr/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:163
throw new Error('call config.load() before reading values')
^
Error: call config.load() before reading values
at Config.get (/usr/lib/node_modules/npm/node_modules/@npmcli/config/lib/index.js:163:13)
at process.errorHandler (/usr/lib/node_modules/npm/lib/utils/error-handler.js:171:32)
at process.emit (node:events:378:20)
at process._fatalException (node:internal/process/execution:163:25)
julius@pi:~ $
Thanks a lot for your Help
Julius