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.

Latest npm package is not working

See original GitHub issue

Hi @toddbluhm I’m using your npm package in react js application. it is not working properly I used below steps:

  1. Install package locally npm i env-cmd

  2. In package.json looks like

    image

  3. Created a .env-cmdrc file in the root directory and structure as

    image

  4. Finally updated scripts object in package.json file like

    image

  5. run the below commond npm start

  6. Got the below error

    image

Please let me know if I’ve missed out anything.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sadashivmcommented, Feb 20, 2020

@toddbluhm , Thank you so much for response.

1reaction
nodabladamcommented, Feb 12, 2020

Note that this error can happen if your file is broken. In my case I accidentally forgot to end a line in my .env-cmd.js file with a comma and then it started acting like the file was gone. I think the latest version is swallowing the critical part of the error. Previous version will give something like:

SyntaxError: Unexpected identifier
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    ...
    at Object.getRCFileVars (\node_modules\env-cmd\dist\parse-rc-file.js:26:33)
Error: Unable to locate .rc file at default locations (./.env-cmdrc,./.env-cmdrc.js,./.env-cmdrc.json)

Current version only seems to show the “Unable to locate .rc file” part.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - npm update does not do anything
Running npm outdated will allow you to check all the packages that need to be updated. The list will show current, wanted and...
Read more >
5 Ways to Fix the Npm Install Not Working Issue
Way 1. Make Sure Npm Is Installed · Way 2. Make Sure There Is a Package.json File · Way 3. Delete Lock File...
Read more >
Common errors
Some strange issues can be resolved by simply running npm cache clean and trying again. If you are having trouble with npm install...
Read more >
npm does not upgrade package to the latest version #14570
I'm opening this issue because: npm is doing something I don't understand. ... npm does not upgrade package to the latest version #14570....
Read more >
How to fix npm install command not working
The error above happens when npm can't be found under the PATH environment variable. First, you need to make sure that npm is...
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