brevo-node icon indicating copy to clipboard operation
brevo-node copied to clipboard

Could not find a declaration file for module '@getbrevo/brevo'.

Open getaaron opened this issue 2 years ago • 4 comments

When I require the Node SDK:

const brevo = require('@getbrevo/brevo')

I get this error:

Could not find a declaration file for module '@getbrevo/brevo'. '/project/node_modules/@getbrevo/brevo/src/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/getbrevo__brevo` if it exists or add a new declaration (.d.ts) file containing `declare module '@getbrevo/brevo';`ts(7016)
module "/project/node_modules/@getbrevo/brevo/src/index"
No quick fixes available

@types/getbrevo__brevo obviously doesn't exist — how should this be resolved?

getaaron avatar Jul 02 '23 20:07 getaaron

Hi @getaaron I guess you are trying to use it in your TS project but we don't currently support types in this package. There is already a discussion going on here.

shubhamUpadhyayInBlue avatar Jul 06 '23 08:07 shubhamUpadhyayInBlue

@shubhamUpadhyayInBlue my project is not a TS project. It’s just plain JS.

getaaron avatar Jul 06 '23 12:07 getaaron

Hi @getaaron I think that your IDE (Eg: VS Code, etc.) might have some settings due to which it is considering it as a TS project. I found error similar to yours in one of the blog posts. They face the same error.

Otherwise, for plain NodeJS projects I don't think this error makes much sense, I mean it should not occur.

shubhamUpadhyayInBlue avatar Jul 07 '23 02:07 shubhamUpadhyayInBlue

When I require the Node SDK:

const brevo = require('@getbrevo/brevo')

I get this error:

Could not find a declaration file for module '@getbrevo/brevo'. '/project/node_modules/@getbrevo/brevo/src/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/getbrevo__brevo` if it exists or add a new declaration (.d.ts) file containing `declare module '@getbrevo/brevo';`ts(7016)
module "/project/node_modules/@getbrevo/brevo/src/index"
No quick fixes available

@types/getbrevo__brevo obviously doesn't exist — how should this be resolved?

has anything be done to this

dkrest1 avatar Oct 23 '23 12:10 dkrest1