Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
getaaron opened this issue Jul 2, 2023 · 4 comments
Open

Comments

@getaaron
Copy link

getaaron commented Jul 2, 2023

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?

@shubhamUpadhyayInBlue
Copy link
Collaborator

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.

@getaaron
Copy link
Author

getaaron commented Jul 6, 2023

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

@shubhamUpadhyayInBlue
Copy link
Collaborator

shubhamUpadhyayInBlue commented Jul 7, 2023

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.

@dkrest1
Copy link

dkrest1 commented Oct 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants