Comments (10)
As I said before, this error only occurs when you have not answered the telemetry prompt before. Thus, a valid work-around would be to add "optOut": false
or "optOut": true
to ~/.config/configstore/insight-cordova.json
. I don't know where the file is located on Windows, unfortunately.
from cordova-cli.
For Windows it should be in C:\Users\%USERNAME%\.config\configstore\insight-cordova.json
from cordova-cli.
Looking at that file:
var permissionTimeout;
var prompt = inquirer.prompt({
type: 'confirm',
name: 'optIn',
message: msg || defaultMsg,
default: true
}, function (result) {
// clear the permission timeout upon getting an answer
clearTimeout(permissionTimeout);
this.optOut = !result.optIn;
cb(null, result.optIn);
}.bind(this));
// add a 30 sec timeout before giving up on getting an answer
permissionTimeout = setTimeout(function () {
// stop listening for stdin
prompt.close();
Two things:
- I gave answer well within 30sec timeout so why would it even call that
- Either inquirer.prompt does not have .close() or there should be one added to the returned object?
from cordova-cli.
OK found the issue will send pr
from cordova-cli.
OK FYI the bug is already fixed in the latest on insight
package - so you just need to update version
The current insight
version being used in cordova 8.1.0
uses a callback mechanism for the inquirer
package - that package now has a promise based interface.
from cordova-cli.
Can you please share the following information:
- which platform
- output of
node --version
- output of
npm --version
I just tried Cordova CLI 8.1.0 on Node.js 4, 6, 8, and 10 on my Windows PC. I found issue on Node.js 4 and raised issue #339; cordova --version
on Cordova CLI 8.1.0 works fine for me on Node.js 6, 8, and 10.
Possibly related: #338
from cordova-cli.
I found a repro for this bug on node 8.12.0, npm 6.4.1
from cordova-cli.
I guess the important part here is that you must not have a saved opt-in for this issue to surface.
@brodybits In hindsight, we should have tested the use-case that actually uses inquirer
after fiddling with the transitive dependencies. I guess a release with older inquirer
should work.
from cordova-cli.
I just reproduced this issue on Windows:
C:\Users\brodybits\Documents
λ rm -rf \Users\brodybits\.config\
C:\Users\brodybits\Documents
λ cordova --version
? May Cordova anonymously report usage statistics to improve the tool over time? Yes
C:\Users\brodybits\AppData\Local\nvs\node\10.11.0\x64\node_modules\cordova\node_modules\insight\lib\index.js:156
prompt.close();
^
TypeError: prompt.close is not a function
at Insight.<anonymous> (C:\Users\brodybits\AppData\Local\nvs\node\10.11.0\x64\node_modules\cordova\node_modules\insight\lib\index.js:156:10)
at ontimeout (timers.js:425:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10)
from cordova-cli.
We just published Cordova CLI 8.1.1 which resolves this issue. In case you encounter this or any other issue in the future please do not hesitate to report it.
from cordova-cli.
Related Issues (20)
- Updation of transitive dependency [email protected] to version greater than 12.1.0 HOT 4
- Template directory on read-only filesystem makes cordova crash HOT 8
- TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator)) HOT 5
- Cordova cli is installing a very old plugin HOT 4
- Update the macos-release package to 3.1.0 to include macos 13 HOT 1
- Build failing when edit-config tag is added to config.xml HOT 1
- 'cordova build ios' taking over 5 minutes to compile and displaying verbose info in terminal HOT 6
- '--searchpath' not working properly on Cordova 11.1
- Cordova has dependencies which use deprecated libraries HOT 4
- 'cordova platform add windows' broken HOT 1
- Create has error on WSL HOT 3
- Optionally serve browser platform over HTTPS HOT 2
- SyntaxError: Unexpected token while upgrade cordova 11.0.0 to 12.0.0 on ios HOT 6
- Cordova 12.0.0 - JAVA Warning on project import to Android Studio (Electric Eel 2022.1.1) HOT 1
- Insight dependency with open CVE HOT 1
- Cordova-cli on MacOS Ventura? HOT 2
- Supporting Windows Platform HOT 1
- Script for plugin hook "after_plugin_rm" does not work
- splash art causes unhelpful error traces HOT 1
- Do you have any plans to support HarmonyOS? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-cli.