bee-js
bee-js copied to clipboard
tsconfig moduleResolution nodenext - error TS7016: Could not find a declaration file
I started a new TS project, installed @ethersphere/bee-js 5.0.0, using node v16.16.0 and npm 8.11.0
package.json#types looks good, points to the correct d.ts file.
Yet I receive this error:
index.ts:1:21 - error TS7016: Could not find a declaration file for module '@ethersphere/bee-js'. '/Users/aron/Code/safe-upload/node_modules/@ethersphere/bee-js/dist/cjs/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/ethersphere__bee-js` if it exists or add a new declaration (.d.ts) file containing `declare module '@ethersphere/bee-js';`
Switching moduleResolution to node fixes it.

Because the dts files this library provided are not valid under NodeNext.
They should have .js extension names.