1

Environment variables were not working. Printed into bash the process.env and some variables have this \r at the end.


MAIN_DB_ADAPTER: 'sails-mongo\r',
REDIS_PORT: '6379\r',

Do you have any idea what's going on? .env.local file looks like

export MAIN_DB_ADAPTER= 'sails-mongo'
export REDIS_PORT: 6379

1 Answers1

3

It looks like the .env.local file was written in with \r\n line terminations, but dotenv wants \n line terminations (see here), and it's using \n to split the environment variables. You should be able to use the answers from this post to convert between the two (TLDR: sed 's/\r$//') or use an editor that supports switching between the two (like Atom, for example).

Mitchell
  • 366
  • 3
  • 9