Nextjs process.env variables appending git installation path

Viewed 60

So I'm on a Windows 10 machine running a trying to run a next.js app (I'm using gitbash). I have a file *.env file with all of my variables, then I also have the config files (next.config.js and config.js).

The *.env file looks something like this:

ATTRIBUTEONE=\somevalue

ATTRIBUTETWO=\somevalue

The config files look something like this:

const config = {

  attributes: {

    attributeOne: process.env.ATTRIBUTEONE,
    attributeTwo: process.env.ATTRIBUTETWO,
(then more variables, you get the idea)
};

export default config;

Basically, I have problem in where when I run my project (I run it using node) all of the variables called through process.env are partially wrong - as in they append my git install path onto all of my variables, so for example attributeOne's value becomes C:\Users\User\AppData\Local\Programs\Git\somevalue, when it should just be \somevalue.

I have no idea why this is happening, any thoughts? Thanks.

0 Answers
Related