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.

Guide for Next.js should mention next-transpile-modules version to use

See original GitHub issue

I love FullCalendar

but the documentation for the workaround for Next.js seems to be not compatible with newer versions of next-transpile-modules. This error comes up when trying it with ntm 7.2.0:

Error: next-transpile-modules - an unexpected error happened when trying to resolve "@fullcalendar". Are you sure the name module 
you are trying to transpile is correct, and it has a "main" or an "exports" field?

It works when downgrading to v4 like the examples have.

Maybe that should be added to the docs for people who are trying to add fullcalendar to their existing Next.js projects.

I didn’t open an issue at fullcalendar/fullcalendar-site-static because maybe there’s a better way than to just change the docs.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:9
  • Comments:6

github_iconTop GitHub Comments

4reactions
bino98commented, Aug 27, 2021
const withTM = require('next-transpile-modules')([
  '@fullcalendar/common',
  '@fullcalendar/react',
  '@fullcalendar/timeline',
  '@fullcalendar/resource-timeline'
  ...
])

module.exports = withTM({
  // any other general next.js settings
})

my situation, solved by listing submodules name in next.config.js. next-transpile-modules version is 8.0.0.

1reaction
nandorojocommented, May 31, 2021

You have to use the full name of the package in the newer versions of next transpile modules, like @fullcalendar/react

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Features: Next.js Compiler
js Compiler transpiles your tests and simplifies configuring Jest together with Next.
Read more >
Next JS - How can I resolve paths with next-transpile-modules?
I've been working on the configuration of next.config.js files and I can't get running. I keep getting this error:.
Read more >
A Guide for Next.js with TypeScript - Refine Dev
We will explain the entire process of how to use Next.js in TypeScript. ... In the end, TypeScript transpiles to plain JavaScript and...
Read more >
Migrating from nextjs 10 to 11 @smallcase - Medium
So to support this use case, we use the next-transpile-modules ... the official migration guide from next JS for upgrading to nextJS 11, ......
Read more >
Purpose, alternatives to next-transpile-modules in next ...
You need this plugin to be able to transpile es6 based files in a specific set of node_modules folders. We use the es6...
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