question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.env file does not have an app associated

See original GitHub issue

I’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.

env-cmd-error

This does not happen when using env-cmd version 8.0.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
toddbluhmcommented, Feb 20, 2020

So quick update on this. I just noticed that in the command cross-env NODE_ENV=development env-cmd .env node server it is missing the -f flag. Starting with env-cmd@v9 and later, in order to pass a custom env file location you have to use the -f flag.

The command should be: cross-env NODE_ENV=development env-cmd -f .env node server

If the .env file is located in the project root and named .env then you do not need to pass anything: cross-env NODE_ENV=development env-cmd node server

Let 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.

0reactions
toddbluhmcommented, Apr 1, 2020

Closing due to inactivity

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found