cordova config ls returns Error: ENOENT on clean install
See original GitHub issueBug 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:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
@mobileben seems like manually creating the file
.config/configstore/cordova-config.json
with content{}
suppresses the error.The issue has been fixed, but there hasn’t been a release with the fix yet. That’s why you still see this.