Soulouf's avatar

MIX variables in .env file does not work

Hello,

It has been over 3 years since I no longer used Laravel.

But I started a brand new app with Laravel recently.

I used to be on Laravel 5.4 and now I'm on version 8.5.

I try to use Algolia for my search with VueInstantSearch and I run into a lot of errors.

Already the variables that I declare in the .env file with the prefix MIX_ are not recognized when I do a console.log(process.env.MIX_MY_VAR).

Is this normal?

Thank you very much for your help.

0 likes
1 reply
Sinnbeck's avatar

Did you remember to recompile? npm run dev

What error are you getting?

Please or to participate in this conversation.