-
Notifications
You must be signed in to change notification settings - Fork 12
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
dayjs-nuxt module error #42
Comments
could you provide more detail or an example repo where this can be reproduced? |
@tcampbPPU I've same problem and create a minimal repo : https://github.com/FabienVINCENT/issue-nuxt-dayjs |
@FabienVINCENT what version of PNPM are you using? i am using |
@FabienVINCENT add this to your "dayjs": "^1.11.11", so in all you are looking like: "devDependencies": {
"dayjs": "^1.11.11",
"dayjs-nuxt": "^2.1.9"
} |
@FabienVINCENT idk why that extra import is needed but lmk if that at least clears up the error |
Yes I found this hack yesterday it actually gets rid of the error |
let me look into why thats needed and i can update the readme so others dont get stuck on this, but hope this satisfies for now |
Even with this:
I'm having the same error.
how can you fix this? |
@RodrigoCarvalhoCode Based on this error message it appears to be a different error, are you using additional dayjs plugins? If so could you create a new issue and provide a sample repo or your config. |
So I've solved in a hacky way, when I was building my project in SSR mode on build, I had import errors. So I've solved it by adding to build transpile, like
And this fixed on build (for production), but it was raising that error that I've said before in local. So I've tried checking if the process.env is production or not like
And this did the trick. Don't understand why the build step would affect vite locally, but this solved it for now. |
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/[email protected]/node_modules/dayjs/dayjs.min.js?v=f805e27d' does not provide an export named 'default' (at dayjs.imports.mjs:3:8)
The text was updated successfully, but these errors were encountered: