Module parse failed: Unexpected token: import.meta
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 285
- Forks
- 33
- Avg merge
- 22h 38m
- Merged PRs (30d)
- 3
Description
Environment
- Operating System: Linux
- Node Version: v18.20.3
- Nuxt Version: 2.18.1
- CLI Version: 3.13.0
- Nitro Version: 2.9.7
- Package Manager: yarn@1.22.19
- Builder: webpack
- User Config: bridge, build, modules, ssr, serverHandlers, devServerHandlers, devServer, typescript, nitro, buildModules
- Runtime Modules: @pinia/nuxt@0.5.4
- Build Modules: (), @nuxt/bridge@3.3.1
Reproduction
https://stackblitz.com/edit/nuxt-bridge-reproduction?file=nuxt.config.ts
Describe the bug
As discussed in https://github.com/vuejs/pinia/pull/2622#issuecomment-2304813676, installing the latest version of @pinia/nuxt in a nuxt bridge project raises an error because import.meta is not parsable.
Reverting back to a version prior to the before-mentioned PR fixes the issue as it still uses process instead.
Additional context
👋 @danielroe
Some reasons for the settings in the reproduction:
ssr: falsehttps://github.com/nuxt/bridge/issues/1144transpile: ['cookie-es']https://github.com/nuxt/bridge/issues/1281
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction and its nuxt.config.ts, using the webpack builder and the listed Nuxt Bridge and @pinia/nuxt versions. Compare the failing latest @pinia/nuxt version with a pre-PR-2622 version to identify the import.meta parsing boundary; done means the reproduction builds successfully without reverting the dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, nuxt, typescript, webpack
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100