Closed AllanPinheiroDeLima closed 1 year ago
So, I solved using a specific version of nuxt bridge which does not have this bug. @wattanx can you test if works for you too?
Im using
"@nuxt/bridge": "npm:@nuxt/bridge-edge@3.0.0-27747000.69db93e"
@AllanPinheiroDeLima
Thanks.
I fixed the problem by changing it to @nuxt/bridge-edge@3.0.0-27747000.69db93e
!
A temporary solution seems to be the method below: https://github.com/nuxt/bridge/issues/748#issuecomment-1520993156
I am able to fixed the issue by overriding one dependency.
"pnpm": {
"overrides": {
"c12": "1.2.0"
}
}
I suggest a more elegant solution
// nuxt.config.ts
export default defineNuxtConfig({
build: {
transpile: ['ohash']
}
})
P.S. The error you are facing is due to the usage of optional chaining (the ?.
operator) in the index.mjs
file of the ohash
package. This syntax is not supported by default.
This should be resolved in the latest Bridge edge release. Thank you for reporting it! ❤️
I recently redownloaded my project, reinstalled its dependencies and out of nowhere I'm having a weird error that didn't happen before.
I tried several things, like installing and configuring the babel plugin for optional chaining, deleting node_modules/package-lock and trying again and I even changed my node version from 14 to 16 to 18, but the problem persists. I tried rolling back my old package-lock to see if the problem would go away, but no luck either. It is also affecting the deploys, wich began to have the same error.
Can anyone shed some light on what could be happening, I'm really clueless and don't know where to look anymore.
My nuxt.config is below: