You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue with typescript: true in Nuxt Bridge Migration
I’m migrating a Nuxt 2 project to Nuxt Bridge following the migration guide.
In the TypeScript setup section, when I set typescript: true in my configuration, I encounter the following error. How can I resolve this?
Error Message:
ERROR Failed to compile with 1 errors friendly-errors 22:23:47
ERROR in ./node_modules/cookie-es/dist/index.mjs friendly-errors 22:23:47
Module parse failed: Unexpected token (22:12) friendly-errors 22:23:47
File was processed with these loaders:
* ./node_modules/unplugin/dist/webpack/loaders/transform.js
* ./node_modules/unplugin/dist/webpack/loaders/transform.js
You may need an additional loader to handle the result of these loaders.
| }
| const key = str.slice(index, eqIdx).trim();
> if (opt?.filter && !opt?.filter(key)) {
| index = endIdx + 1;
| continue;
friendly-errors 22:23:47
@ ./node_modules/h3/dist/index.mjs 113:0-56 906:9-16 915:18-27 922:54-61
@ ./node_modules/@nuxt/bridge/dist/runtime/composables/ssr.mjs
@ ./.nuxt/imports.mjs
@ ./.nuxt/capi.plugin.mjs
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Issue with
typescript: true
in Nuxt Bridge MigrationI’m migrating a Nuxt 2 project to Nuxt Bridge following the migration guide.
In the TypeScript setup section, when I set
typescript: true
in my configuration, I encounter the following error. How can I resolve this?Error Message:
Node.js Version:
v22.2.0
package.json
Dependencies:tsconfig.json
:nuxt.config.js
I’d appreciate any advice or solutions. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions