Open Divesh-Kumar-Chordia opened 1 year ago
this are the nuxt.config and package.json file .
@Divesh-Kumar-Chordia this is not related to index.html
but to pinia-plugin-persistedstate
.
In your nuxt.config.ts
add this line
build: {
transpile: ['pinia-plugin-persistedstate'],
},
Here's a source of this workaround: https://github.com/prazdevs/pinia-plugin-persistedstate/issues/236#issuecomment-1712104845
nuxt] Could not resolve id pinia-plugin-persistedstate C:... \JohnWeekDev\aliExpressClone\index.html 2:09:22 pm
// https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ devtools: { enabled: true }, pages:true, modules:[ 'nuxt-icon', 'nuxt-lodash', '@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt', '@nuxtjs/tailwindcss', // '@nuxtjs/supabase' ], runtimeConfig: { public: { stripePk:process.env.STRIPE_PK_KEY, } }, app:{ head:{ script:[ {src:'https://js.stripe.com/v3/',defer:true} ], } } })
{ "name": "nuxt-app", "private": true, "scripts": { "build": "nuxt build", "dev": "nuxt dev", "generate": "nuxt generate", "preview": "nuxt preview", "postinstall": "nuxt prepare" }, "prisma": { "seed": "node prisma/seed.js" }, "devDependencies": { "@nuxt/devtools": "latest", "@pinia-plugin-persistedstate/nuxt": "^1.1.1", "nuxt": "^3.7.0" }, "dependencies": { "@nuxtjs/supabase": "^1.0.2", "@nuxtjs/tailwindcss": "^6.8.0", "@pinia/nuxt": "^0.4.11", "@prisma/client": "^5.2.0", "@stripe/stripe-js": "^2.1.0", "nuxt-icon": "^0.5.0", "nuxt-lodash": "^2.5.0", "pinia": "^2.1.6", "prisma": "^5.2.0", "stripe": "^13.3.0" } }