Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.1 - devtoolsApi is not defined #2914

Open
lianee opened this issue Feb 15, 2025 · 3 comments
Open

3.0.1 - devtoolsApi is not defined #2914

lianee opened this issue Feb 15, 2025 · 3 comments
Labels
contribution welcome 📚 docs Related to documentation changes 🧑‍💻 pkg:devtools Related to devtools

Comments

@lianee
Copy link

lianee commented Feb 15, 2025

Reproduction

https://jsfiddle.net/0sj7apb6/

Steps to reproduce the bug

Using the pinia.iife.js 3.0.1 now gives the error: "Uncaught ReferenceError: devtoolsApi is not defined"
no error with 3.0.0, probably related to #2910 fix

Expected behavior

no error, and working devtools with the no prod version

Actual behavior

error using the iife.js, and no devtools using the iife.prod.js

Additional information

No response

@posva
Copy link
Member

posva commented Mar 3, 2025

The devtools API has indeed been removed from the iifee given the considerable size increase. It has to be included manually. This should be added to docs (migration guide) and to the changelog.

@posva posva added contribution welcome 📚 docs Related to documentation changes 🧑‍💻 pkg:devtools Related to devtools labels Mar 3, 2025
@lianee
Copy link
Author

lianee commented Mar 3, 2025

I understand, but I haven't found how to include it manually in iife. I just see a cjs and a esm version in node_modules/@vue/devtools-api/lib/
Perhaps this lib should be included in the dev version (iife.js), and not in iife.prod.js, I suspect it was like that in 3.0.0, and I don't see a problem having a big dev file

@houd1ni
Copy link

houd1ni commented Mar 7, 2025

I'm having the similar issue, isn't it related? I'm migrating from 2.3.1 to 3.0.1. And I'm not using any devtools related APIs at all, also even disabled devtools in my browser to check with no success.

Uncaught TypeError: Cannot create proxy with a non-object as target or handler
    at node_modules/@vue/devtools-kit/dist/index.js (index_f240.0be6a908.js:2088:34)
    at ModuleSystem.require (07032025/:395:26)
    at node_modules/pinia/node_modules/@vue/devtools-api/dist/index.js (index_f290.b725f0c7.js:2054:27)
    at ModuleSystem.require (07032025/:395:26)
    at node_modules/pinia/dist/pinia.mjs (index_acf3.09fbed4d.js:927:27)
    at ModuleSystem.require (07032025/:395:26)
    at src/store.ts (router.tsx:26:1)
    at ModuleSystem.require (07032025/:395:26)
    at src/styles.ts (store.ts:21:1)
    at ModuleSystem.require (07032025/:395:26)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome 📚 docs Related to documentation changes 🧑‍💻 pkg:devtools Related to devtools
Projects
None yet
Development

No branches or pull requests

3 participants