Intended outcome:
Successful apollo service:push
Actual outcome:
Failed apollo service:push
Error: EISDIR: illegal operation on a directory, read
at Object.loadConfig (/app/node_modules/apollo-language-server/lib/config/loadConfig.js:49:50)
How to reproduce the issue:
Create an empty directory called .env in the root of the project and run apollo service:push.
Versions
apollo@2.6.2
apollo-language-server@1.5.4
Culprit
The precise problem is that apollo-language-server checks for the existence of .env, and assumes that if it exists then it is a config file it can read. In this case it is a directory. In fact, it could be a directory or a completely irrelevant file.
In general the problem is that apollo-language-server tries to make guesses about the environment it's running in. I would much prefer to configure it with explicit arguments (to the CLI, which are passed to the apollo-language-server library). I would rather it didn't look at my files, or my environment variables.
I should be able to be free to do what I want with my environment without worrying about nested dependencies looking at it and breaking.
Intended outcome:
Successful
apollo service:pushActual outcome:
Failed
apollo service:pushHow to reproduce the issue:
Create an empty directory called
.envin the root of the project and runapollo service:push.Versions
apollo@2.6.2apollo-language-server@1.5.4Culprit
The precise problem is that
apollo-language-serverchecks for the existence of.env, and assumes that if it exists then it is a config file it can read. In this case it is a directory. In fact, it could be a directory or a completely irrelevant file.In general the problem is that
apollo-language-servertries to make guesses about the environment it's running in. I would much prefer to configure it with explicit arguments (to the CLI, which are passed to theapollo-language-serverlibrary). I would rather it didn't look at my files, or my environment variables.I should be able to be free to do what I want with my environment without worrying about nested dependencies looking at it and breaking.