0

I am setting up a project on the local host which is developed in VueJS and NuxtJS and the backend is in laravel (APIs). Laravel's setup is successfully completed but the fronted (vueJs and NuxtJs) is through an error. I have updated the .env.dev file and installed the node with all required dependencies but still facing the same issue. I have even changed the stripe keys but it's still not working.

Can anybody look into the matter and help me?

PROD_API_URL=https://api..com/api DEV_API_URL=http://api..test:8000/api STRIPE_PUBLISHABLE_KEY=pk_test_*********

enter image description here

Need help to resolve the issue in setting up the project on the localhost.

1 Answers1

-1

Based on the error, it looks like you're using nuxt-stripejs, the setup instructions for which indicate you should be putting your publishable key in the nuxt.config.js file rather than .env[.dev]. This other Nuxt stripe package also uses the nuxt config file to set up the publishable key.

Are you sure your .env key is being set up properly for the package you're using? Can you share where you actually use that env var after import?

Nolan H
  • 6,205
  • 1
  • 5
  • 19
  • This probably deserves to be a comment. And OP can totally write his env into `.env` here. For the rest, my linked answer already covers the whole part. – kissu Oct 27 '22 at 14:30