Skip to content

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

Description

@block2k

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

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions