I tried many options like even creating a fresh a fresh Nuxt project, still I could not make it work under an iframe. I am receiving the below error,
Uncaught TypeError: Cannot read properties of undefined (reading ‘send’)
Basically, it points out to the function below inside one of the nuxt files,
function Ae(W) { return globalThis.a.send(W, l.b.POST_MESSAGE_NAMES.HELLO, {}, { domain: l.b.WILDCARD, timeout: -1 }).then(function(A) { return { origin: A.origin } }) }
I have no idea what this function is, but looking at the top, probably vite function.
All I am seeing is Nuxt template loader and not proceeding further. I tried updating nuxt and vite, node modules cleanup, Cloudflare proxy off, x-frame options set to any but still not working.
Its working good with our old Nuxt 2/vue 2 project.
My dependencies:
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@fullcalendar/core": "^6.1.15",
"@fullcalendar/daygrid": "^6.1.15",
"@fullcalendar/interaction": "^6.1.15",
"@fullcalendar/vue3": "^6.1.15",
"@nuxt/image": "^1.7.0",
"@paypal/paypal-js": "^8.1.0",
"@pinia-plugin-persistedstate/nuxt": "^1.2.0",
"@pinia/nuxt": "^0.5.1",
"@popperjs/core": "^2.11.8",
"@vitejs/plugin-vue": "^5.1.0",
"@vueuse/nuxt": "^10.9.0",
"animate.css": "^4.1.1",
"axios": "^1.7.0",
"countup.js": "^2.8.0",
"debounce": "^2.0.0",
"lodash": "^4.17.21",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"nuxt": "^3.12.4",
"pinia": "^2.1.7",
"primeflex": "^3.3.1",
"primeicons": "^7.0.0",
"quill": "^1.3.7",
"uuid": "^9.0.1",
"v-calendar": "^3.1.2",
"vee-validate": "^4.12.8",
"video.js": "^8.16.1",
"videojs-panorama": "^0.1.7",
"videojs-vr": "^2.0.0",
"vite": "^5.3.5",
"vue": "^3.4.27",
"vue-flatpickr-component": "^11.0.5",
"vue-multiselect": "^3.0.0-beta.3",
"vue-paypal-checkout": "^3.2.0",
"vue-router": "^4.3.3",
"vue-sweetalert2": "^5.0.10",
"vue-toastification": "^2.0.0-rc.5",
"yup": "^1.4.0"
},
"devDependencies": {
"nuxt-primevue": "^0.3.1",
"sass": "^1.77.2"
}
here is the nuxt config details:
(Omitted App meta and Primevue config for readability)
devtools: { enabled: true },
spaLoadingTemplate: "./spa-loading.html",
ssr: false,
nitro: {
serveStatic: true,
},
router: {
options: {
hashMode: false,
scrollBehaviorType: "smooth",
},
},
routeRules: {
"/": { prerender: false },
},
alias: {
quill: process.dev ? "quill/dist/quill.js" : "quill",
},
imports: {
dirs: ["stores", "stores/*/", "composables", "composables/*/"],
},
plugins: [
{ src: "~/plugins/axios.js", mode: "client" },
{ src: "~/plugins/autoAnimate.js", mode: "client" },
{ src: "~/plugins/veeValidate.js", mode: "client" },
{ src: "~/plugins/flatPickr.js", mode: "client" },
{ src: "~/plugins/sweetAlert.js", mode: "client" },
{ src: "~/plugins/vueToast.js", mode: "client" },
{ src: "~/plugins/vueMultiselect.js", mode: "client" },
],
modules: [
[
"@pinia/nuxt",
{
autoImports: ["defineStore", "storeToRefs"],
storesDirs: ["./stores/**", "./custom-folder/stores/**"],
},
],
[
"@pinia-plugin-persistedstate/nuxt",
{
storage: "localStorage",
},
],
"nuxt-primevue",
"@nuxt/image",
],
mohan krishnan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.