0

I unintentionally updated a good junk of npm packages listed in my package.json file and now I'm experiencing issues importing the FullCalendar package.

Here's what I know: When I import the Fullcalendar module or any any plugins from the package (e.g. import dayGridPlugin from '@fullcalendar/daygrid), the exported script does not execute. I have not had issues importing other npm packages in other js files. All of my other scripts have not experienced this issue.

JS File:

import * as utils from './utils.js';
import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';

console.log("show me something");

console: .... Nothing happens.

However, If I do not import from @fullcalendar the script behaves as expected.

JS file:

import * as utils from './utils.js';
// import { Calendar } from '@fullcalendar/core';
// import dayGridPlugin from '@fullcalendar/daygrid';

console.log("show me something");

console: show me something

Troubleshooting:

  • Webpack successfully updates the file after changes via npm run watch
  • I have confirmed the updated file is loading in the browser
  • I have tried reverting packages to previous version (e.g. @fullcalendar@4.4.2 - previous version that was working)... same result
  • Downgraded from webpack 5 -> webpack@4.46.0 ... same result
  • Checked documentation to ensure I was using fullcalendar v5 correctly after upgrading from v4 - https://fullcalendar.io/docs/initialize-es6

Relevant Version Nunbers

  • @fullcalendar/core@5.6.0
  • @fullcalendar/daygrid@5.6.0
  • @fullcalendar/list@5.6.0
  • @fullcalendar/timegrid@5.6.0
  • webpack@4.46.0

I'm really stumped on this one. I'm sure it's due to my limited knowledge of ES6 modules. I appreciate any insight that you can provide. Thanks!

Nick Mancini
  • 119
  • 3
  • 11
  • Can't reproduce this in [CodeSandbox](https://codesandbox.io/s/wild-shape-1xi0q?file=/src/index.js) (uses parcel bundler instead of Webpack). Have you tried the old `rm -rf node_modules package-lock.json && npm install`? – Phil Mar 31 '21 at 00:16
  • you might find this answer helpful: https://stackoverflow.com/a/42711271/9078341 – Randy Casburn Mar 31 '21 at 00:17
  • @RandyCasburn `@fullcalendar` is the correct namespace – Phil Mar 31 '21 at 00:18
  • @Phil - Ref Parcel working - I think that's because Parcel _always_ uses Babel where Webpack has to be configured. – Randy Casburn Mar 31 '21 at 00:18
  • @RandyCasburn - Thank you for your the response. I was able to create a workaround by reverting back to previous versions in my npm packages and downgrading to webpack 4. I still don't understand the root of the issue. Thanks again! – Nick Mancini Apr 13 '21 at 17:45
  • @Phil thank you! (see above) – Nick Mancini Apr 13 '21 at 17:45

0 Answers0