Closed Rigo-m closed 9 months ago
I am getting "Module parse failed: Identifier 'ref' has already been declared"
We're also seeing this issue in Openverse's frontend when attempting the Nuxt bridge upgrade today. I'll try to create a minimal-reproduction branch, but for now the error can be seen on the branch for this PR:
https://github.com/WordPress/openverse-frontend/pull/760
Clone the project, checkout the update/nuxt-bridge-attempt-take-2
branch and run pnpm dev
. The errors will be present in the console.
I'll work on a minimal repro example today to see if I can help narrow down the root cause.
are you still experiencing this?
Yes, you can see this on https://github.com/WordPress/openverse-frontend/pull/1292, run pnpm install && pnpm build:only
and it will cause lots of import issues.
I tried setting autoImports.global
to false
, but the configuration for auto imports appears to be basically undocumented so I'm not sure if that's meant to disable auto-imports.
We don't wish to use auto-imports in the WordPress/openverse-frontend project, being able to disable this would be helpful both for evading this bug and getting away from auto-imports.
I started experiencing this issue when upgrading from nuxt bridge 3.0.0-27982868.cf7ca7b to 3.0.0-27998567.a12a710. Is there a workaround?
I just encountered this error with a large Nuxt 2.17 app.
It has not responded for a while, so I am closing it. Reopen is welcome.
Environment
Darwin
v16.13.0
2.16.0-27277936.ab1c6cb4
yarn@1.22.10
Webpack
target
,vue
,env
,head
,css
,plugins
,storybook
,tailwindcss
,components
,bridge
,nitro
,buildModules
,modules
,gtm
,image
,markdownit
,screen
,axios
,i18n
,googleFonts
,build
,alias
,serverMiddleware
,generate
,router
@nuxtjs/axios@5.13.6
,@nuxtjs/markdownit@2.0.0
,nuxt-svg-loader@1.2.0
,@nuxtjs/i18n@7.2.0
,vue-screen/nuxt
,portal-vue/nuxt
,nuxt-route-meta@2.3.2
,@nuxtjs/gtm@2.4.0
,vue-social-sharing/nuxt
Build Modules:
@nuxtjs/dotenv@1.4.1
,@nuxtjs/eslint-module@3.0.2
,@nuxtjs/google-fonts@1.3.0
,@nuxtjs/tailwindcss@4.2.1
,@nuxt/image@0.6.0
,@pinia/nuxt@0.1.5
,~/modules/menu
,~/modules/hubspot-properties
,~/modules/write-redirects
,~/modules/write-robots
,@nuxt/bridge@3.0.0-27328916.daec432
Reproduction
Can't reproduce for now
Describe the bug
After pulling any
bridge-edge
build that comes after this commit (https://github.com/nuxt/framework/commit/f5d1d9a208881bfabd9ba53445a04ef597a99825) breaks bothyarn dev
andyarn build
builds with the following errors:Additional context
Happens both in my machine and in netlify build environment
Logs
No response