Skip to content
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

Cannot find module - Vue3, Vite & Vitest #7125

Closed
1 task done
mikecbone opened this issue Jan 5, 2023 · 3 comments
Closed
1 task done

Cannot find module - Vue3, Vite & Vitest #7125

mikecbone opened this issue Jan 5, 2023 · 3 comments

Comments

@mikecbone
Copy link

Reduced Test Case

https://stackblitz.com/edit/github-c67sof?file=tests/CalendarFreeComponent.test.js&view=editor

Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?

  • I understand

Which connector are you using (React/Angular/etc)?

Vue

Bug Description

When running very basic tests using vitest, if a component imports FullCalendar then the test fails with

Error: Cannot find module '.../node_modules/@fullcalendar/vue3/dist/FullCalendar' imported from '.../node_modules/@fullcalendar/vue3/dist/index.js'

Attached test case demos this if you run yarn test.

@puppe82
Copy link

puppe82 commented Jan 6, 2023

Maybe it's the same issue I was having with the new FullCalendar 6.x version.

Webpack 5 expects modules to have file extensions for import statements. In order to disable the default behavior, one needs to set a rule fullySpecified: false


Webpack 5: Import fails to resolve with Module not found error

#7114

webpack 5.0.0-beta.30 Module not found: Error: Can't resolve '../../core-js/object/define-property'

webpack/webpack#11467

Webpack documentation

https://webpack.js.org/configuration/module/#resolvefullyspecified

@arshaw
Copy link
Member

arshaw commented Jan 11, 2023

Queued for release. See #7114 (comment)

@arshaw arshaw closed this as completed Jan 11, 2023
@arshaw
Copy link
Member

arshaw commented Jan 11, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants