New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack 5: Import fails to resolve with Module not found error #7114
Comments
Would you be able to post a runnable, stripped-down demonstration of the bug? Would really appreciate it because the time saved reproducing will be time spent fixing. You can use this example project as a starting point, I didn't have any issue building with yarn: https://github.com/fullcalendar/fullcalendar-examples/tree/main/vue3 |
I could try to post a demonstration of the bug. I'm using FullCalendar as a part of a Quasar (https://quasar.dev/) project and do understand that the issue might not always be present when using Vue 3. Nonetheless, I guess the question is whether there is a reason to omit the file extension in the Is it possible that I'm running into the problem described below?
|
I had a look into other packages in the I'll let you know if I find another example of a package in which the file extension is omitted in the Any help would be appreciated if there's some flag or setting I could enable to fix the issue. I'm paying for the license and think this is a wonderful project but instead of sending an email decided to ask here if someone else is facing the same issue - or possibly knows how to fix it. Below are some examples of other packages. |
FullCalendar v6https://stackblitz.com/edit/quasarframework-webpack-wsrvk3?file=package.json FullCalendar v5https://stackblitz.com/edit/quasarframework-webpack-biw33g?file=package.json |
I have now added stripped-down demonstration of the issue comparing
|
I also cloned the repo (https://github.com/fullcalendar/fullcalendar-vue) added the missing file extensions and ran
|
Thanks for the demos, I can confirm there's an issue with importing this way, although I'm not sure it's a bug that the extensions are missing. I also see this error which sounds like the issue is with using
I found a suggestion here to disable that in Webpack settings: quasarframework/quasar#9103 (comment) And this seems to resolve the error in your demo: https://stackblitz.com/edit/quasarframework-webpack-csyqoy?file=quasar.config.js%3AL77 |
Basically what that I'll leave it to you if you want to fix it or not. Thank you for the reference when it comes to Quasar and Webpack settings. It will most probably fix the issue and is exactly the "flag or setting" I was looking for in the previous messages. Nonetheless, it's just a Webpack configuration and shouldn't have anything to do with Quasar. It's rather a workaround to get FullCalendar 6.x working with Webpack 5.
|
ModuleRule.resolveresolve.fullySpecifiedhttps://webpack.js.org/configuration/module/#resolvefullyspecified |
I can confirm that Thank you for all the help! |
the proper fix is queued for release fullcalendar/fullcalendar-vue@ad69648 |
released. see #7125 (comment) |
Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?
Which connector are you using?
Vue 3
Bug Description
After upgrading to FullCalendar v6, I get an error about failing to resolve a dependency.
When I checked the file mentioned in the error, it looks like this:
If I change the first line with the import to include the file extension
.js
, I get two new similar errors:That file called
FullCalendar.js
looks like this:Adding the file extension
.js
to imports on lines 4 and 5 seems to fix the issues, and the library starts to work as expected.I have tried to find information online about whether the issue is in my own configuration or in the library's source code but so far I haven't been able to find any other fix than adding the
.js
file extension on the above mentioned lines for the imports.This issue appeared after upgrading to
@fullcalendar/vue3
version6.0.0
, and the same issue persists in versions6.0.1
and6.0.2
Could it be that package.json needs some extra rule or setting that the generated files in
dist/
folder would have the imports with.js
file extensions?In case this issue depends on the package manager, I'm using
yarn
in my project.Additionally, here are my
node
andnpm
versions.The text was updated successfully, but these errors were encountered: