Node-v3 icon indicating copy to clipboard operation
Node-v3 copied to clipboard

Could not find a declaration file for module 'flutterwave-node-v3'

Open the-timoye opened this issue 5 years ago • 6 comments

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';

the-timoye avatar Sep 02 '20 16:09 the-timoye

I could begin to add the types for this project gradually over this weekend. Typescript support is highly desirable these days.

iyiolapeter avatar Feb 09 '21 20:02 iyiolapeter

@iyiolapeter have you added the typings?

Marcosmaliki avatar Apr 24 '22 08:04 Marcosmaliki

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));

opeolluwa avatar Jun 08 '22 12:06 opeolluwa

@iyiolapeter have you added the typings?

check this out https://github.com/Flutterwave/Flutterwave-node-v3/issues/25#issuecomment-1149875017

opeolluwa avatar Jun 08 '22 12:06 opeolluwa

I am using angular Creating a custom typings file for flutterwave-node-v3 and include it in the tsconfig.app.json file.

  1. 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
  2. In your tsconfig.app.json file include "src/**/*.d.ts" if not included.

juventusjude avatar Jun 22 '22 10:06 juventusjude

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

aeraveapp avatar Sep 08 '22 03:09 aeraveapp