Could not find a declaration file for module 'flutterwave-node-v3'
Could not find a declaration file for module 'flutterwave-node-v3'. '.../node_modules/flutterwave-node-v3/index.js' implicitly has an 'any' type.
Try npm install @types/flutterwave-node-v3 if it exists or add a new declaration (.d.ts) file containing declare module 'flutterwave-node-v3';
I could begin to add the types for this project gradually over this weekend. Typescript support is highly desirable these days.
@iyiolapeter have you added the typings?
I encounter a similar error.
instead of using import as seen in the following listing
import Flutterwave = from 'flutterwave-node-v3';
const flw = new Flutterwave(String(process.env.FLUTTERWAVE_PUBLIC_KEY), String(process.env.FLUTTERWAVE_SECRET_KEY));
I used const and it helped silenced the error of declaration not found
const Flutterwave = require('flutterwave-node-v3');
const flw = new Flutterwave(String(process.env.FLUTTERWAVE_PUBLIC_KEY), String(process.env.FLUTTERWAVE_SECRET_KEY));
@iyiolapeter have you added the typings?
check this out https://github.com/Flutterwave/Flutterwave-node-v3/issues/25#issuecomment-1149875017
I am using angular Creating a custom typings file for flutterwave-node-v3 and include it in the tsconfig.app.json file.
- create a file in the src folder and name it flutterwave.d.ts and "declare 'flutterwave-node-v3" module in the file. as in
declare module 'flutterwave-node-v3';inside the flutterwave.d.ts file - In your tsconfig.app.json file include
"src/**/*.d.ts"if not included.
Could not find a declaration file for module 'flutterwave-node-v3'. '.../node_modules/flutterwave-node-v3/index.js' implicitly has an 'any' type. Try npm install @types/flutterwave-node-v3 if it exists or add a new declaration (.d.ts) file containing declare module 'flutterwave-node-v3'; Still having this issue even after " add a new declaration (.d.ts) file containing declare module 'flutterwave-node-v3' ", error goes away but none of my firebase functions deploy whenever flutterwave is imported