CJS module import is broken on latest
See original GitHub issueDescribe the bug Latest CJS packages seem to be broken (9.3.3). Using 9.2.1 works. See codesandbox or the log below:
[ error ] ./node_modules/react-dnd-cjs/lib/common/DndContext.js
Module not found: Can't resolve 'dnd-core' in '/mnt/c/dev/foobar/app/node_modules/react-dnd-cjs/lib/common'
{ Error: Cannot find module 'dnd-core'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
Reproduction
Issue Analytics
- State:
- Created 4 years ago
- Reactions:20
- Comments:29 (12 by maintainers)
Top Results From Across the Web
Node Modules at War: Why CommonJS and ES ... - Code Red
ESM scripts can import CJS scripts, but only by using the “default import” syntax import _ from 'lodash' , not the “named import”...
Read more >How to fix Must use import to load ES Module discord.js
1. The solution is in the error message: Instead rename index.js to end in . · node-fetch version 3 (current latest) wont allow...
Read more >CommonJS modules | Node.js v19.3.0 Documentation
The module.exports property can be assigned a new value (such as a function or object). Below, bar.js makes use of the square module,...
Read more >JS Fix For "SyntaxError: Cannot Use Import Statement Outside ...
This is most likely triggered when a file tries to use both import and require module patterns, which isn't possible. You'll need to...
Read more >JavaScript modules - MDN Web Docs
Renaming imports and exports. Inside your import and export statement's curly braces, you can use the keyword as along with a new feature...
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 FreeTop 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
Top GitHub Comments
I’m out until the 20th - feel free to reopen this if the problem persists. Thanks!
I’m removing the absolute URLs from the create_packages script, it should be up in a minute