Open wJoenn opened 2 months ago
We have checked that it works in the latest edge release.
@nuxt/bridge-edge@3.3.1-28745713.5493b4e
https://stackblitz.com/edit/github-toccfh
Thank you both 🙌
@wattanx hi, I still have the same problem.
It looks like your example does not contain @pinia/nuxt
package.
Check the repro here: https://stackblitz.com/edit/github-toccfh-mifppg?file=package.json
@wattanx Thanks for your quick reply!
When I run npx nuxi/@latest module add pinia
as described in that instruction, I see @pinia/nuxt
is installed and added to the dependencies. (and, I couldn't find any text that we don't need @pinia/nuxt
for Nuxt Bridge)
Also, when I run your example(stackblitz.com/edit/github-toccfh), I see the warning log below. Is that ignorable?
WARN Module @pinia/nuxt not found. Please ensure @pinia/nuxt is in dependencies and installed.
It was my mistake to say that installation is not necessary
@yshrsmz the fix has been merged but it hasn't been released yet. Follow 3.4's PR https://github.com/nuxt/bridge/pull/1261 if you wanna be notified about when it'll become available
@wJoenn I've tested with @nuxt/bridge-edge@3.3.1-28745713.5493b4e
(the latest edge) and @nuxt/bridge-edge@3.3.1-28745713.5493b4e
(the version wattanx mentioned), so I think I used the version which includes the change.
my repro is here: https://stackblitz.com/edit/github-toccfh-mifppg
Or did you confirm it's working as intended?
No my bad, I'm in mobile right now so I didn't take the time to check your repro. Sorry about that.
If edge doesn't work either then I suppose the fix doesn't work ? I'll let Wattanx answer that
@wattanx Sorry to bother you, but did you confirm the behavior? If my repro is correct, could you please reopen the issue? Or should I create another issue?
It seems that the issue hasn't been fixed, so I reopened it. By the way, you can migrate to Nuxt 3 without migrating to Pinia if you use the following module https://github.com/wattanx/nuxt-vuex-module https://github.com/vedmant/nuxt3-vuex#nuxt3-vuex-module
import fs from "fs";
const target = "node_modules/@pinia/nuxt/dist/runtime/plugin.vue2.js";
const contents = fs
.readFileSync(target, { encoding: "utf-8" })
.replace("import.meta.server", "process.server");
fs.writeFileSync(target, contents);
I worked around this problem by writing a fix script. It's useful until the issue is fixed properly.
Environment
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 becauseimport.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: false
https://github.com/nuxt/bridge/issues/1144transpile: ['cookie-es']
https://github.com/nuxt/bridge/issues/1281Logs
No response