Error: Can't resolve 'normalize-url' with HMR enabled
See original GitHub issue- Operating System: Windows 10 Home
- Node Version: v10.15.3
- NPM Version: 6.4.1
- webpack Version: 4.30.0
- mini-css-extract-plugin Version: 0.6.0
Expected Behavior
No error with HMR enabled.
Actual Behavior
This error with HMR enabled:
ERROR in ../node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js
Module not found: Error: Can't resolve 'normalize-url' in 'C:\Users\Glen\Desktop\css-hmr-issue\node_modules\mini-css-extract-plugin\dist\hmr'
@ ../node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js 18:19-43
@ ./app/styles/main.scss
@ ./main.ts
@ ../node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
@ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
Change hmr: isHot
to hmr: false
(twice), and the error will go away.
Could this be an issue with aurelia-webpack-plugin? All I know is that it works with MCEP 0.5.0 + css-hot-loader.
Code
https://github.com/glen-84/css-hmr-issue/blob/master/webpack.config.js
How Do We Reproduce?
https://github.com/glen-84/css-hmr-issue (npm i
, npm start
)
(this is a copy of our project that I reduced from ~571 files to 31)
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
normalize-url - npm
Start using normalize-url in your project by running `npm i ... There are 1018 other projects in the npm registry using normalize-url.
Read more >HAProxy version 1.7.14 - Configuration Manual - GitHub Pages
This can't be detected at configuration parsing time due to HAProxy's ability to dynamically resolve backend name at runtime.
Read more >HAProxy version 2.6.7-5 - Configuration Manual
This can't be detected at configuration parsing time due to HAProxy's ability to dynamically resolve backend name at runtime.
Read more >VLC command-line help - VideoLAN Wiki
Otherwise, video will be cropped to fix in canvas after scaling. ... error and warnings dialogs (default enabled) Show unimportant error and ...
Read more >ffmpeg Documentation
Each input or output url can, in principle, contain any number of streams of ... This option is enabled by default as most...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This seems to have just stopped happening in the repro project. 😕
I’m going to try it again in our real project, and see what happens.
I can swear that I deleted
node_modules
andpackage-lock.json
yesterday, and it didn’t work. I just did it again now (along withnpm cache clear --force
), and now it’s working! 🎉(sorry about the false alarm)