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.

cordova config ls returns Error: ENOENT on clean install

See original GitHub issue

Bug Report

Problem

The configstore dependency was upgraded from 2.1.0 to 4.0.0 in #312. However, as of v4.0.0 configstore no longer creates a configuration file when a config is read (yeoman/configstore#57). This causes cordova config ls to return Error: ENOENT if cordova-config.json is missing (e.g. on a clean install).

What is expected to happen?

The command shouldn’t return an error (behavior of 8.1.2):

$ rm ~/.config/configstore/cordova-config.json
$ cordova config ls
$

What does actually happen?

The command returns Error: ENOENT:

$ rm ~/.config/configstore/cordova-config.json
$ cordova config ls
Error: ENOENT: no such file or directory, open '/Users/ltm/.config/configstore/cordova-config.json'
$

Information

Command or Code

$ npm install -g cordova@latest
$ rm ~/.config/configstore/cordova-config.json
$ cordova config ls

Environment, Platform, Device

$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.14.4
BuildVersion:	18E226

Version information

$ cordova --version
9.0.0 (cordova-lib@9.0.1)

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Issue Analytics

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

github_iconTop GitHub Comments

10reactions
Arxicommented, Oct 31, 2019

@mobileben seems like manually creating the file .config/configstore/cordova-config.json with content {} suppresses the error.

2reactions
raphinessecommented, Oct 31, 2019

The issue has been fixed, but there hasn’t been a release with the fix yet. That’s why you still see this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with npm start (error : spawn cmd ENOENT)
Go to search bar and write environment variables. You should see an option to called edit system environment variables or something similar.
Read more >
There Is No Phonegap\.Cordova\Config.Json - ADocLib
This causes cordova config ls to return Error: ENOENT if cordovaconfig.json is missing e.g. on a clean install. What is expected to happen?...
Read more >
Common errors | npm Docs
The error Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7 is a consequence of joyent/node#8141, and is an issue with the Node installer ...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >
Issue with cordova projects – IDEs Support (IntelliJ Platform)
can't see anything suspicious in the log... Can you backup the `~/.IntelliJIdea2019.1` folder and delete it to start with fresh configuration, ...
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