You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crashes with Error: Must use import to load ES Module:
@babel/runtime/helpers/esm/objectSpread2.js
require() of ES modules is not supported.
require() of @babel/runtime/helpers/esm/objectSpread2.js
from react-big-calendar/lib/Calendar.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename objectSpread2.js to end in .cjs, change the requiring code to use import()
I tried to test this like you asked, but my build still failed, and then I got distracted on another task. Thank you for releasing a fix so quickly. It's all good now.
Check that this is really a bug
Reproduction link
Latest release (today)
Bug description
Crashes with Error: Must use import to load ES Module:
@babel/runtime/helpers/esm/objectSpread2.js
require() of ES modules is not supported.
require() of @babel/runtime/helpers/esm/objectSpread2.js
from react-big-calendar/lib/Calendar.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename objectSpread2.js to end in .cjs, change the requiring code to use import()
Expected Behavior
Not blow up
Actual Behavior
Blows up
react-big-calendar version
0.39.5
React version
17.0.2
Platform/Target and Browser Versions
using Next.js
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: