Results in an error attempting to compile it using npx tsc
npm i
npx tsc
node_modules/@vonage/server-client/dist/client.d.ts:1:26 - error TS7016: Could not find a declaration file for module 'node-fetch'. '.../node_modules/node-fetch/lib/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/node-fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-fetch';`
1 import { Response } from 'node-fetch';
~~~~~~~~~~~~
node_modules/@vonage/vetch/dist/errors/vetchError.d.ts:2:26 - error TS7016: Could not find a declaration file for module 'node-fetch'. '.../node_modules/node-fetch/lib/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/node-fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-fetch';`
2 import { Response } from 'node-fetch';
~~~~~~~~~~~~
Found 2 errors in 2 files.
Errors Files
1 node_modules/@vonage/server-client/dist/client.d.ts:1
1 node_modules/@vonage/vetch/dist/errors/vetchError.d.ts:2
Node Version
20.x
Platform
Mac (Apple Silcon)
SDK Version
3.12.0
Code Sample
Using typescript:
package.json
tsconfig.json
src/index.ts
Expected Behavior
Code works without any issue when running tsc
Actual Behavior
Results in an error attempting to compile it using
npx tsc