You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the packages [email protected] and @material-ui/[email protected] are used and date-fns is imported before@material-ui/pickers/adapter/date-fns, the following error is observed:
Uncaught SyntaxError: The requested module '/node_modules/.vite/date-fns.js?v=cf140b8b' does not provide an export named 'default'
If date-fns is imported after@material-ui/pickers/adapter/date-fns, no error is observed.
git clone [email protected]:b6dd7048a1544d7190d42e48f130d30d.git vite-issue-1847
cd vite-issue-1847
npm i && npm run dev
Open http://localhost:3000. You should observe the following error in the web console:
Uncaught SyntaxError: The requested module '/node_modules/.vite/date-fns.js?v=cf140b8b' does not provide an export named 'default'
Now, in main.js, swap the order of imports of date-fns and @material-ui/pickers/adapter/date-fns, run rm -r node_modules/.vite and then npm run dev. You shouldn't observe an error in the console anymore.
System Info
vite version: 2.0.0-beta.61
Operating System: MacOS Catalina 10.15.7
Node version: v12.18.4
Package manager (npm/yarn/pnpm) and version: NPM 6.14.6
The text was updated successfully, but these errors were encountered:
Describe the bug
When the packages
[email protected]
and@material-ui/[email protected]
are used anddate-fns
is imported before@material-ui/pickers/adapter/date-fns
, the following error is observed:If
date-fns
is imported after@material-ui/pickers/adapter/date-fns
, no error is observed.Reproduction
https://gist.github.com/hmaurer/b6dd7048a1544d7190d42e48f130d30d
Open http://localhost:3000. You should observe the following error in the web console:
Now, in
main.js
, swap the order of imports ofdate-fns
and@material-ui/pickers/adapter/date-fns
, runrm -r node_modules/.vite
and thennpm run dev
. You shouldn't observe an error in the console anymore.System Info
vite
version: 2.0.0-beta.61The text was updated successfully, but these errors were encountered: