background-image css rule raises "Uncaught (in promise) Error: Cannot find module" in console
See original GitHub issueChoose one: is this a ๐ bug report or ๐ feature request? This is a ๐ bug report.
๐ Configuration
Hereโs the smallest reproducible configuration. No .babelrc, just 3 simple files:
index.html - <link rel="stylesheet" href="index.css"> in head and <div>hi</div> in body.
index.css - div { background: url("bg_diag.png"); }
bg_diag.png - 
๐ค Expected Behavior
Clean console
๐ฏ Current Behavior
http://localhost:1234/ seems okay (thereโs a single network request and the page loads with that background-image for the div element). However, thereโs an error in console:
Uncaught (in promise) Error: Cannot find module '6b40fa7fa533b048cde070004da2b0e1.png,4'
    at newRequire (css-loader.js:30)
    at newRequire (css-loader.js:22)
    at localRequire (css-loader.js:30)
    at css-loader.js:30
    at <anonymous>
๐ Your Environment
"devDependencies": {
  "parcel-bundler": "^1.6.2"
}
| Software | Version(s) | 
|---|---|
| Node | v8.9.4 | 
| npm | 5.6.0 | 
| Operating System | Chrome on macOS | 
Issue Analytics
- State:
 - Created 6 years ago
 - Reactions:16
 - Comments:10 (2 by maintainers)
 
Top Results From Across the Web
Adding background image throws a module load error
When I add background-image: url(โฆ/images/my-image.png) to phoenix.css, the image displays correctly but the console shows an error Uncaught ...
Read more >Next.js background-image css property cant load the image
the image doesn't appear and no errors happened then, i tried to type in the browser website-url + the console.log results the image...
Read more >How to fix CSS background-image not working | HTML/CSS
3. Explicitly set the element's width and/or height. ... If the image isn't showing up, but you aren't getting any 404 errors, go...
Read more >Module not found: Error: Can't resolve file ยท Issue #4778 - GitHub
I tried that and it did compile with no errors, but then at runtime it was looking for 'assets' in the root of...
Read more >css-loader - npm
Start using css-loader in your project by running `npm i css-loader`. ... (include resolve.modules ) and for alias , prefix it with a...
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

I just add
import 'index.css'in entry js, and remove the<link rel="stylesheet" href="index.css">to resolve this issue.This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.