Cannot find module '../node_modules/refractor/lang/markup.js'
See original GitHub issue🐛 bug report
Parcel doesn’t seem to able compile package refractor
.
I get the error Uncaught (in promise) Error: Cannot find module '../node_modules/refractor/lang/markup.js'
even though the file markup.js
is in place.
🎛 Configuration (.babelrc, package.json, cli command)
"babel": {
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-syntax-class-properties",
"@babel/plugin-syntax-dynamic-import"
]
}
🤔 Expected Behavior
Shouldn’t throw any errors since the package is fine
😯 Current Behavior
Uncaught (in promise) Error: Cannot find module '../node_modules/refractor/lang/markup.js'
at newRequire (bundler.73ee101b.js:37)
at newRequire (core.9a94de7c.js:29)
at newRequire (refractor.5c664bab.js:29)
at newRequire (core.9a94de7c.js:21)
at localRequire (core.9a94de7c.js:53)
at Object.parcelRequire.../node_modules/refractor/core.js.hastscript (core.js:23)
at newRequire (core.9a94de7c.js:47)
at newRequire (refractor.5c664bab.js:29)
at newRequire (bundler.73ee101b.js:21)
at localRequire (bundler.73ee101b.js:53)
💁 Possible Solution
🔦 Context
💻 Code Sample
🌍 Your Environment
Software | Version(s) |
---|---|
Parcel | 1.12.3 |
Node | 12.3.1 |
Yarn | 1.16 |
Operating System | Ubuntu 18.04 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
The module (package) not found is always specified in the format "Module not found: Error: Can't resolve 'package name' in 'project directory".
Read more >Node.js cannot find module & etc. · Issue #309 · nodejs/help
So i have a node.js script that came with some modules and i am struggling to run it (Debian 7). this is my...
Read more >How to resolve "Cannot find module" error in Node - Sabe.io
To fix the Cannot find module error, simply install the missing modules using npm . To so, you can use the following command:...
Read more >Cannot find module (node.js / npm) - javascript - Super User
You're telling node to execute a script called run , with index.js being an argument to run : Usage: node [options] [ -e...
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’m seeing this same error.
I’m trying to use the react-syntax-highlighter package. I do see markup.js in node_modules.
I met this issue and use a workaround below.