Error when using -f *.js file
See original GitHub issueWhat am I missing?
This is the error:
Error: Failed to find .env file at path: ./ignore/env.js
at getEnvFile (.../xxxxx/node_modules/env-cmd/dist/get-env-vars.js:40:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
package.json script:
"scripts": {
"start": "env-cmd -f ./ignore/env.js node ./dist/index.js"
}
env.js content:
module.exports = {
EXTERNAL_ADD: true,
INTERNAL_ADD: true,
EXECUTIONS: "invisible"
}
Also tried using Promise.resolve
module.exports = Promise.resolve ({
EXTERNAL_ADD: true,
INTERNAL_ADD: true,
EXECUTIONS: "invisible"
})
Tried using full path and still the same error.
OS: Mac env-cmd: “^10.1.0” Node: v10.22.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
why is the browser shows me file not found error when i try to ...
this will look like <script type="text/javascript" src='C:\User\ (navigate through your files and folders to get to sign-up.js)'></script> This ...
Read more >Control flow and error handling - JavaScript - MDN Web Docs
If an exception is thrown while the file is open, the finally block closes the file before the script fails. Using finally here...
Read more >Documentation - Type Checking JavaScript Files - TypeScript
js file are considered optional. Calls with fewer arguments than the declared number of parameters are allowed. It is important to note that...
Read more >The 10 Most Common JavaScript Issues Developers Face
As explained in our JavaScript Hiring Guide, “strict mode” (i.e., including 'use strict'; at the beginning of your JavaScript source files) is a...
Read more >Error Editing .js Files in Windows - AllWebCo Templates
Support for problems editing .js files in Windows. The .js files on your computer may be associated with another application or may have...
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

Hey everyone, sorry for not being around lately. I have been super busy working on a new/young startup with little free time to spare as well as migrating
ts-standardover to the actualstandardorg.However, I have nearly completed the next major iteration of this project. It will bring a lot of simplification, it will do a lot more “auto-discovery” of env files, as well as easy expandability using different file formats (I already have support for sync/async
js/json/json5/yaml/toml/mjs/.envand maybetsas well…still investigating) and maybe even env expansion within each env file (TBD). I have been reviewing each feature request/issue in github and would like to tackle everything I can before the release.I have already fixed the error message stuff that is being discussed here as well. I apologize for my absence, but my day job has to come first for my family’s sake.
Thanks @toddbluhm !!