question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
glen-84commented, Apr 29, 2019

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.

0reactions
glen-84commented, Apr 29, 2019

I can swear that I deleted node_modules and package-lock.json yesterday, and it didn’t work. I just did it again now (along with npm cache clear --force), and now it’s working! 🎉

(sorry about the false alarm)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found