Ionic Cordova platform add android (Exit code 1) node depreication warnining

#1

Reinstalled ionic , cordova and node js completly , after this Deprication error of node js promise is generating. this not able to perform cordova add platform or any plugin. System not adding platform android

ionic cordova platform add android

Using cordova-fetch for cordova-android@~7.0.0
(node:6352) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch platform cordova-android@~7.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
The filename, directory name, or volume label syntax is incorrect.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
(node:6352) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#2

Hello,

have you checked thiis?

The filename, directory name, or volume label syntax is incorrect.

Best regards, anna-liebt

#3

What command are you running?
What do you get when you run it with --verbose added at the end?
What is your ionic info output?

#4

i have resinstalled the node version, codova n ionic. ionic project is working as ionic serve , when goin to add cordova platform or anything related to cordova this unhandled promise appears .

ionic info --verbose
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: ‘D:\india’, local: false, binPath:
‘C:\Users\Sahil\AppData\Roaming\npm\node_modules\ionic\bin\ionic’, libPath:
‘C:\Users\Sahil\AppData\Roaming\npm\node_modules\ionic\dist\index.js’ }
[DEBUG] Daemon found (pid: 10588)

cli packages: (C:\Users\Sahil\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 25.2.5
Node              : v8.9.3
npm               : 5.5.1
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Program Files (x86)\Android\android-sdk

Misc:

backend : pro
#5

can you please describe which file name , diretory name or volume lable syntax in windows 10 .?

#6

No ionic info --verbose, but the command that is giving you an error with --verbose at the end.

#7

Here is the add platform command with verbose. As far as i know that cordova not fetching any thing and given some promise issue.

ionic cordova platform add android --verbose
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: ‘D:\india’, local: false, binPath:
‘C:\Users\Sahil\AppData\Roaming\npm\node_modules\ionic\bin\ionic’, libPath:
‘C:\Users\Sahil\AppData\Roaming\npm\node_modules\ionic\dist\index.js’ }
[DEBUG] Daemon found (pid: 9580)

cordova platform add android --save
Using cordova-fetch for cordova-android@6.0.0

(node:9676) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Failed to fetch platform cordova-android@6.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
(node:9676) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#8

That is a problem with Cordova CLI 8.0.0:
https://issues.apache.org/jira/projects/CB/issues/CB-13694

You might want to install an older version.

#9

that looking something different now i downgraded the cordova cli and getting this msj in win10, please take a look.

Error: Failed to fetch platform cordova-android@6.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.

┌────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) C:\Users\Sahil.config │
└────────────────────────────────────────────────────────────┘
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

#10

Any idea what is the last stable version that works?