question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apple M1 – Issue w/ @babel/runtime/helpers/interopRequireDefault.js error w/ NextJS, unable to use component

See original GitHub issue

Check that this is really a bug

  • I confirm

Reproduction link

https://github.com/gavgrego/dead-cal

Bug description

When trying to use component on a page with NextJS get an error related to /home/runner/work/react-big-calendar/react-big-calendar/node_modules/@babel/runtime/helpers/interopRequireDefault.js

`error - Error: Cannot find module ‘/home/runner/work/react-big-calendar/react-big-calendar/node_modules/@babel/runtime/helpers/interopRequireDefault.js’ Require stack:

  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/react-big-calendar/lib/index.js
  • /Users/gavin/Sites/cal-dead/cal-dead/.next/server/pages/index.js
  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/next/dist/server/require.js
  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/next/dist/server/load-components.js
  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/next/dist/build/utils.js
  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/next/dist/build/output/store.js
  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/next/dist/build/output/index.js
  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/next/dist/cli/next-dev.js
  • /Users/gavin/Sites/cal-dead/cal-dead/node_modules/next/dist/bin/next`

Expected Behavior

No response

Actual Behavior

No response

react-big-calendar version

0.36.4

React version

0.36.4

Platform/Target and Browser Versions

macOS M1

Validations

  • Read the docs.
  • Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a react-big-calendar issue and not an implementation issue

Would you like to open a PR for this bug?

  • I’m willing to open a PR

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
wayimpcommented, Mar 20, 2022

I encountered this exact same issue with my Next.js project.

3reactions
gavgregocommented, Mar 22, 2022

@sangeeth69 @cutterbl looks like this just introduced a new bug, still not working for me.

Error: require() of ES Module /Users/gavin/Sites/cal-dead/cal-dead/node_modules/@babel/runtime/helpers/esm/objectSpread2.js from /Users/gavin/Sites/cal-dead/cal-dead/node_modules/react-big-calendar/lib/Calendar.js not supported. Instead change the require of objectSpread2.js in /Users/gavin/Sites/cal-dead/cal-dead/node_modules/react-big-calendar/lib/Calendar.js to a dynamic import() which is available in all CommonJS modules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Segmentation error when using on latest node js on m1 with ...
As, i have installed node js version 16.3.0 which supports apple silicon, but next js is not working and producing segmentation error when...
Read more >
How to get next.js and vercel to work on M1 mac
I'm building my blog website using next.js and vercel. Today, I was working on an M1 MacBook Air and I got the following...
Read more >
React / NextJS: Type error: 'Component' cannot be used as a ...
I updated Next.js to 12.1.6 and it worked (I removed yarn.lock and installed again with yarn install ). This is my package.json:
Read more >
Solving the Styled Components Warning in Next.JS with Babel
It's listed on an obscure Github issue somewhere. Well, without further ado, here you go. First run: npm i babel-plugin-styled-components. Then ...
Read more >
How to install Next JS App on MacBook 2022 macOS ...
Participate in the active giveaway: https://gleam.io/zVA1v/inr-50000-amazon-gift-card-giveawayHow to install Next JS App on MacBook 2022 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found