MisterOrrange opened a new issue #522:
URL: https://github.com/apache/cordova-cli/issues/522


   # Bug Report
   On updating the cordova to 10.0.0 version, cordova build is failing with the 
below error
   
   
   ## Problem
   When I try using any cordova command (cordova create hello com.example.hello 
HelloWorld, cordova platform add ios, cordova build ios) I get the error 
message:
   /usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:103
        async fetchInfo() {
   
   ### What is expected to happen?
   Project creating, adding ios or build ios 
   
   ### Full Error messsage
   /usr/local/lib/node_modules/cordova/node_modules/update-notifier/index.js:103
        async fetchInfo() {
              ^^^^^^^^^
   SyntaxError: Unexpected identifier
       at Object.exports.runInThisContext (vm.js:78:16)
       at Module._compile (module.js:543:28)
       at Object.Module._extensions..js (module.js:580:10)
       at Module.load (module.js:488:32)
       at tryModuleLoad (module.js:447:12)
       at Function.Module._load (module.js:439:3)
       at Module.require (module.js:498:17)
       at require (internal/module.js:20:19)
       at Object.<anonymous> 
(/usr/local/lib/node_modules/cordova/src/cli.js:19:22)
       at Module._compile (module.js:571:32)
   
   ## Function causing the problem
   
   async fetchInfo() {
                const {distTag} = this.options;
                const latest = await latestVersion()(this.packageName, 
{version: distTag});
   
                return {
                        latest,
                        current: this.packageVersion,
                        type: semverDiff()(this.packageVersion, latest) || 
distTag,
                        name: this.packageName
                };
        }
   
   ## Information
   The error doesn't occur on cordova version 9.0.0
   After trying to debug by changing the asynchronous function to synchronous, 
I get a new error message:
   
/usr/local/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigParser/ConfigParser.js:191
               ...attrib
               ^^^
   SyntaxError: Unexpected token ...
       at Object.exports.runInThisContext (vm.js:78:16)
       at Module._compile (module.js:543:28)
       at Object.Module._extensions..js (module.js:580:10)
       at Module.load (module.js:488:32)
       at tryModuleLoad (module.js:447:12)
       at Function.Module._load (module.js:439:3)
       at Module.require (module.js:498:17)
       at require (internal/module.js:20:19)
       at Object.get ConfigParser [as ConfigParser] 
(/usr/local/lib/node_modules/cordova/node_modules/cordova-common/cordova-common.js:29:34)
       at Object.<anonymous> 
(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/cordova-lib.js:30:25)
   
   
   ### Command or Code
   Any cordova command produces the problem
   cordova create hello com.example.hello HelloWorld
   cordova platform add ios
   cordova platform build ios
   
   
   ### Environment, Platform, Device
   macOS Catalina Version 10.15.4
   
   
   ### Version information
   Cordova 10.0.0
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to