Replies: 3 comments 3 replies
-
You are using a node-only dependency in your bundle. It should also error in dev. You need to isolate the lib that cause the issue and report to the lib or use another one |
Beta Was this translation helpful? Give feedback.
-
This is my vite 2 based project's package-lock.json file, this library is working file with "viteCommonJS" plugin in development but causing "require not defined" after build has completed when run "npm run preview" "node_modules/vue2-google-maps": { |
Beta Was this translation helpful? Give feedback.
-
I solved the problem. As for me, the problem was caused by a package that depends on 'ordered-uuid'. here is how i solve the problem
|
Beta Was this translation helpful? Give feedback.
-
My vite react app work perfectly on the localhost, after I deployed it to vercel, the page goes blank and this message is logged to the console Uncaught ReferenceError: require is not defined
I have tried many ways to resolve it but to no avail. I even downgraded the nodejs version from 18x to 16x yet the issue haven't resolved.
Here is the error message:
Here is the line within the index-08337b32.js that is causing the error:
Beta Was this translation helpful? Give feedback.
All reactions