0

This is the command I am trying to run to build the project with platforms and plugins installed

grunt build --env=devel --platform=android --crosswalk=false

It is throwing syntax error

When I run this I get

Running "build" task

Build Parameters
================
env       = devel
platform  = android
crosswalk = false

Running "cleanup:devel:android" (cleanup) task

Running "shell:remove_all_platforms" (shell) task
C:\Users\saius\AppData\Roaming\nvm\v12.13.0\node_modules\cordova\node_modules\nopt\lib\nopt-lib.js:64
const StringType = typeDefs.String?.type

SyntaxError: Unexpected token '.'
at Module._compile (internal/modules/cjs/loader.js:892:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous>

Note: Node version: 12.13.0 NPM version: 6.12.0 Cordova version: ~12.0.1[New version released by the cordova-android]

It should build the project with platforms and plugins installed

1
  • Your Node version is way too old for that Cordova release. Commented Sep 19, 2023 at 8:43

1 Answer 1

0

You should update Node version: 12.13.0 upper than 14.x Here we had the same error and after update on 16.x it's gone

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.