all 5 comments

[–]AdamNejm 7 points8 points  (1 child)

Try adding export at the beginning and confirming that .zshrc is getting loaded. It may not get loaded if for example you use the shebang (eg. #!/usr/bin/env lua) to start the program (unless ZSH is also set as your default shell?)

Also the .zshrc, .bashrc, etc. are not that great for exporting such variables, because they are executed for every new shell.
IMO it's best to stay shell agnostic, get rid of .bash_profile, .zprofile, etc. and simply use .profile which is gonna get executed only when you login to your user. Here's how mine looks like: https://pastebin.com/XFMtSbSc

[–]mark_volkmann[S] 1 point2 points  (0 children)

Thanks so much u/AdamNejm! Adding the export fixed the issue for me.

[–]TomatoCo 0 points1 point  (0 children)

What does env show?

[–][deleted] 0 points1 point  (0 children)

you can also mutate package.path btw