.env file does not have an app associated
See original GitHub issueI’m on Windows 10 with NodeJS v12.11.1
env-cmd version: 10.0.1 cross-env version: 6.0.3
The command I’m running is:
cross-env NODE_ENV=development env-cmd .env node server
I get this error message for the .env file is:
This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page.

This does not happen when using env-cmd version 8.0.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to fix "This file does not have an app associated with it for ...
Set the default app associations. The error tells me to go to default apps and select a file association there. · Shut down...
Read more >How to fix This file does not have an app associated with it for
Please install an app or, if one is already installed, create an association in the Default Apps Settings page. How to fix below...
Read more >Fix: This File Does Not Have an App Associated With It
If Windows says the file you're trying to open does not have an app associated with it, try opening via File Explorer.
Read more >Frontend App Configuration
When your app was deployed to the Atlas platform, an environment variable file was automatically provisioned. Most apps rely on environment variable files...
Read more >Open ENV File on Windows, Mac OS, Android
If a ENV file is not opened in a Mac OS application and you instead get a "There is no application set to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So quick update on this. I just noticed that in the command
cross-env NODE_ENV=development env-cmd .env node serverit is missing the-fflag. Starting withenv-cmd@v9and later, in order to pass a custom env file location you have to use the-fflag.The command should be:
cross-env NODE_ENV=development env-cmd -f .env node serverIf the
.envfile is located in the project root and named.envthen you do not need to pass anything:cross-env NODE_ENV=development env-cmd node serverLet me know how that works. I have my windows side up and running. I also just added windows support to the env-cmd examples repo here: https://github.com/toddbluhm/env-cmd-examples with all tests passing.
Closing due to inactivity