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

**URL:** <https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996>\
**Category:** ionic-v3\
**Created:** [December 20, 2017, 4:17pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996 "2017-12-20T16:17:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sedar](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sedar](https://forum.ionicframework.com/u/sedar)\
**Post date:** [December 20, 2017, 4:17pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/1 "2017-12-20T16:17:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anna\_liebt](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@anna\_liebt](https://forum.ionicframework.com/u/anna_liebt)\
**Post date:** [December 20, 2017, 6:23pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/2 "2017-12-20T18:23:57Z")

</div>

Hello,

have you checked thiis?

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

Best regards, anna-liebt

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [December 20, 2017, 7:50pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/3 "2017-12-20T19:50:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sedar](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sedar](https://forum.ionicframework.com/u/sedar)\
**Post date:** [December 21, 2017, 6:34am UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/4 "2017-12-21T06:34:32Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![sedar](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sedar](https://forum.ionicframework.com/u/sedar)\
**Post date:** [December 21, 2017, 6:35am UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/5 "2017-12-21T06:35:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [December 21, 2017, 10:31am UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/6 "2017-12-21T10:31:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sedar](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sedar](https://forum.ionicframework.com/u/sedar)\
**Post date:** [December 21, 2017, 11:11am UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/7 "2017-12-21T11:11:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [December 21, 2017, 12:09pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/8 "2017-12-21T12:09:22Z")

</div>

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

You might want to install an older version.

---

<div class="post-metadata">

**Author:** ![sedar](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sedar](https://forum.ionicframework.com/u/sedar)\
**Post date:** [December 21, 2017, 12:34pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/9 "2017-12-21T12:34:59Z")

</div>

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”})

---

<div class="post-metadata">

**Author:** ![blizzrdof77](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/blizzrdof77/32/116170_2.png) [@blizzrdof77](https://forum.ionicframework.com/u/blizzrdof77)\
**Post date:** [January 11, 2018, 10:01pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/10 "2018-01-11T22:01:23Z")

</div>

Any idea what is the last stable version that works?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:57pm UTC](https://forum.ionicframework.com/t/ionic-cordova-platform-add-android-exit-code-1-node-depreication-warnining/115996/11 "2021-07-19T21:57:59Z")

</div>

Closed on July 19, 2021, 9:57pm UTC


