Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Uncaught Error: Cannot find module '[a number]' #198

Closed
Coooooooola opened this issue Dec 11, 2017 · 10 comments
Closed

🐛 Uncaught Error: Cannot find module '[a number]' #198

Coooooooola opened this issue Dec 11, 2017 · 10 comments
Labels

Comments

@Coooooooola
Copy link

Coooooooola commented Dec 11, 2017

index.html
styles.css
main.js
style-for-main.css

in index.html:

<link rel='stylesheet' href='styles.css'>
<script src='main.js'></script>

in main.js:

import './style-for-main.css'

throw an error in browser

@davidnagli
Copy link
Contributor

Hi! Thanks for reporting this.

Can you please provide the actual error that you’re seeing in the browser, as well as your Node and Parcel version numbers.

@davidnagli
Copy link
Contributor

For future reference, please actually fill out the issue template :)

@Coooooooola
Copy link
Author

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

@Coooooooola
Copy link
Author

bug.zip

@Coooooooola
Copy link
Author

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.

@brandon93s
Copy link
Contributor

@rabbitmeow do you mind providing your entire project directory? The attachment appears to be the /dist directory of your project.

@fearclear
Copy link

I've had this problem, too. But when I delete that .cache and restart, it's working.

@Coooooooola
Copy link
Author

I'm in class, talk to you guys later. 😅😅😅😭😭😭

@Coooooooola
Copy link
Author

bug

@DeMoorJasper DeMoorJasper changed the title Uncaught Error: Cannot find module '[a number]' 🐛 Uncaught Error: Cannot find module '[a number]' Dec 13, 2017
@brandon93s
Copy link
Contributor

@rabbitmeow closing for now. Feel free to re-open with your src directory if this remains an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants