index.html
styles.css
main.js
style-for-main.css
<link rel='stylesheet' href='styles.css'>
<script src='main.js'></script>
import './style-for-main.css'
_throw an error in browser_
Hi! Thanks for reporting this.
Can you please provide the actual error that you鈥檙e seeing in the browser, as well as your Node and Parcel version numbers.
For future reference, please actually fill out the issue template :)
In browser
Uncaught Error: Cannot find module '4'
at newRequire (6723a4dcfb94ab73680250feba38b07f.js:32)
at localRequire (6723a4dcfb94ab73680250feba38b07f.js:38)
at Object.require.5._css_loader (6723a4dcfb94ab73680250feba38b07f.js:70)
at newRequire (6723a4dcfb94ab73680250feba38b07f.js:46)
at localRequire (6723a4dcfb94ab73680250feba38b07f.js:38)
at Object.require.3../style-for-main.css (6723a4dcfb94ab73680250feba38b07f.js:77)
at newRequire (6723a4dcfb94ab73680250feba38b07f.js:46)
at require.5._css_loader (6723a4dcfb94ab73680250feba38b07f.js:63)
at 6723a4dcfb94ab73680250feba38b07f.js:68
everything is well in node
Even more, Parcel wouldn't update the files when I remove the import './style-for-main.css';
I have got to restart Parcel to resolve it.
@rabbitmeow do you mind providing your entire project directory? The attachment appears to be the /dist directory of your project.
I've had this problem, too. But when I delete that .cache and restart, it's working.
I'm in class, talk to you guys later. 馃槄馃槄馃槄馃槶馃槶馃槶

@rabbitmeow closing for now. Feel free to re-open with your src directory if this remains an issue.
Most helpful comment
I've had this problem, too. But when I delete that .cache and restart, it's working.