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
I've been using PostRobot for a while. I use it to communicate with my application when implementing it in an iframe. I am on Nuxt2, and it works very well.
I am currently migrating to Nuxt3 and encountering an issue. When importing the library (on the client side), I get an error like this:
"WeakMap expected key." at _proto.has (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:931:21) at _proto.getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:950:22) at getStore (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1262:31) at Object.getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1280:38) at addRequestListener (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2212:53) at on_on (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2237:12) at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2527:32 at util_getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1121:21) at Object.getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1238:24) at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2526:47
I don't understand why, as I have the window variable accessible.
Thank you for your help.
The text was updated successfully, but these errors were encountered:
Same issue. Can work around it via if you import the browser version directly. Hope it saves some time to someone.
// nuxt.config.tsapp: {head: {// make sure to match your iframe version, @krakenjs scoped package doesn't work with this one...script: [{src: 'https://unpkg.com/[email protected]/dist/post-robot.min.js'}],},},
// global.d.ts at root nuxt folderimportPostRobotfrom'post-robot'export{}declare global {interfaceWindow{__NUXT__: anypostRobot: typeofPostRobot}}
Hello,
I've been using PostRobot for a while. I use it to communicate with my application when implementing it in an iframe. I am on Nuxt2, and it works very well.
I am currently migrating to Nuxt3 and encountering an issue. When importing the library (on the client side), I get an error like this:
"WeakMap expected key."
at _proto.has (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:931:21) at _proto.getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:950:22) at getStore (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1262:31) at Object.getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1280:38) at addRequestListener (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2212:53) at on_on (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2237:12) at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2527:32 at util_getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1121:21) at Object.getOrSet (http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:1238:24) at http://localhost:3000/_nuxt/node_modules/.cache/vite/client/deps/post-robot.js?v=de6bb484:2526:47
I don't understand why, as I have the window variable accessible.
Thank you for your help.
The text was updated successfully, but these errors were encountered: