-
Notifications
You must be signed in to change notification settings - Fork 113
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
After upgrade experiencing syntax error with importing merge from lodash #680
Comments
This doesn't look like generated by the latest version of this module. Should have |
Hi @rchl — thanks for your response. All right ... let me look into this a bit further. Based on on I thought maybe there was something to do with our |
delete if nuxt fails to start correctly that it would not re-generate those sentry files so you would be seeing old versions |
I started over with:
However, same problem. I then looked inside of import merge from '~lodash.mergewith' So, it's in the built source; however, when I follow the error from the browser console to view the source of the file in my browser it has been converted (along with other lines actually) to the broken version. With this knoweldge, I went ahead and disabled the That's helped me to narrow it down. Now just need to figure out what nuxt-vite is doing wrong here. |
I am working to upgrade the
nuxt/sentry
module to8.x
from6.x
. I am using nuxt2.17.3
. The upgrade went smoothly until I loaded my browser and I get an error in the console:This problem stems from
.nuxt/sentry.client.shared.js
which appears (to me) to be auto-generated during the build. (I'm new to Nuxt so sorry if this is obvious!). In the console, I can inspect that file and see the import statement that is causing the error:When I look at
node_modules/lodash.mergewith/index.js
I see it is usingmodule.exports
instead ofexport default
so it seems this would mean we would need torequire('lodash.mergewith')
.My question is: Why doesn't nuxt know to do that already? How do I tell it to? I've been googling and chat-gpt-ing and not finding any straightforward answer to what I am missing here.
Appreciate anyone who can point me in the right direction to sort this out. I've inherited this project on the front-end and still figuring out this ecosystem. Thanks!
configs
My simplified
nuxt.config.js
file looks like:The text was updated successfully, but these errors were encountered: