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

NestJs Config Module incompatible with Typescript 4 #420

Closed
ashubisht opened this issue Nov 16, 2020 · 1 comment
Closed

NestJs Config Module incompatible with Typescript 4 #420

ashubisht opened this issue Nov 16, 2020 · 1 comment

Comments

@ashubisht
Copy link

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

NestJs config module is not compatible with Typescript 4.
When trying to import the ConfigModule, its not available in IDE quick assist. Forcefully trying to import ConfigModule from @nestjs/config gives an error - Cannot find module '@nestjs/config' or its corresponding type declarations

Expected behavior

ConfigModule should be available after installing @nestjs/config

Minimal reproduction of the problem with instructions

Installed typescript and nestjs cli
Initialise a project, and then install @nestjs/config.
Try to import ConfigModule in AppModule, and it throws an error.

I compared with one of my old projects, and rollbacked the Typescript version to 3, after which the error goes away.

What is the motivation / use case for changing the behavior?

Not as per expectations from the documentation.

Environment


Nest version: 7.5.1

 
For Tooling issues:
- Node version: 14.15.0  
- Platform:  Mac 

Others:

Typescript version: ^4.0.5
@kamilmysliwiec
Copy link
Member

Remove the node_modules directory and package-lock.json/yarn.lock file and reinstall all dependencies.

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.

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

2 participants