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

HMR (Hot-Module Replacement) error: Cannot use import statement outside a module #1218

Open
block2k opened this issue Oct 26, 2023 · 2 comments
Assignees

Comments

@block2k
Copy link

block2k commented Oct 26, 2023

I cloned your project, then set up HRM following the instructions of nestjs docs
https://docs.nestjs.com/recipes/hot-reload

then I run the command: nest build --webpack --webpackPath webpack-hmr.config.js --watch
and receive the error as shown in the image:

Cannot use import statement outside a module

image

I tried running npm run start:dev and the project still started up without errors

@block2k
Copy link
Author

block2k commented Nov 11, 2023

@Shchepotin Do you have any way to fix this error?

@Shchepotin
Copy link
Collaborator

@block2k Sorry but no, because TypeORM has a problem with their config in HMR mode.

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

No branches or pull requests

2 participants