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

Error asking for index.html #1

Open
Divesh-Kumar-Chordia opened this issue Aug 28, 2023 · 2 comments
Open

Error asking for index.html #1

Divesh-Kumar-Chordia opened this issue Aug 28, 2023 · 2 comments

Comments

@Divesh-Kumar-Chordia
Copy link

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"
}
}

@Divesh-Kumar-Chordia
Copy link
Author

this are the nuxt.config and package.json file .

@peterstnsz
Copy link

@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: prazdevs/pinia-plugin-persistedstate#236 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants