Damon
Upgrading nuxt/sentry from 6.x to 8.x causes syntax error on export
I have a Nuxt 2.17 project I've inherited and am working to upgrade the
In the console, I can inspect the file and see the import statement that is causing the error: When I look at
But 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. Humans! I miss humans!
nuxt/sentry
module to 8.x
from 6.x
. The upgrade went smoothly until I loaded my browser and I get an error in the console:
This problem seems to stem from the .nuxt/sentry.client.shared.js
file which appears (to me) to be auto-generated during the build (new to Nuxt! sorry!).In the console, I can inspect the 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 using module.exports
instead of export default
so it seems this would mean we would need to require('lodash.mergewith')
.But 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. Humans! I miss humans!
1 replies