-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
TypeError in production builds #28192
Comments
I don't know if this is just a sandbox for other people to try the bug or if it is meant to be a solution but it fails with the same error as before (locally and on StackBlitz). |
I encountered the same issue in recent days, although the provided example is also failing in the development environment (because of SSR). Here is a working example (in development), but with the same issues in production as described by @MacjaZival. https://stackblitz.com/edit/nuxt-starter-dwx7jw?file=app.vue |
This is likely an upstream bug either in Would you see if you can reproduce this in pure Nitro (reproduction sandbox)? |
I do not understand how the web server could impact a package only used on the client. My first assumption was that something went wrong with bundling. Also if it is a problem with device-uuid (that was last updated 7 years ago) why was it working a few days ago and then suddenly stopped and also why does it still work in development (and not in production)? I would love to try and reproduce it in the reproduction sandbox but I don't know what I am trying to reproduce here... as I stated this package is only meant to be used on the client. If I am missing something here please explain it to me 😅. |
This means the problem could be a recent update in Nuxt's sub-dependency (could be Nitro in this case, as development is working and I also encounter a similar issue with |
I am having the same issue when building an app with vite instead of vue-cli-service. Several issues are open regarding this on the device-uuid github page |
Environment
Nuxt project info:
Reproduction
Create a new nuxt project (
npx nuxi@latest init test
) install device-uuid (npm i device-uuid
) and use the package on the client. You can just replace app.vue with:This will work if you run it with
npm run dev
but will not work if you run it withnpm run build && node .output/server/index.mjs
throwing something along the lines ofTypeError: Od.DeviceUUID is not a constructor
Describe the bug
Package bundling seems to work incorrectly in production builds.
Additional context
This worked a few days ago but now does not anymore. I tried different node versions, different nuxt versions, vue versions, vite versions,... assuming that a package updated and broke things but nothing helped.
Logs
No response
The text was updated successfully, but these errors were encountered: