Ionic-archive says that i don't have platform install but there is

Hi,
I follow all the steps of this how to: Generating release outputs for Ionic,
However i encounter a problem during the step ionic-archive.
It says this:
“Error: No platforms added to this project. Please use cordova platform add .
No ios nor android platform’s output dir exist
No output generated”

And i don’t understand why because i already added android platform.

This is the ionic archive log part:

+------------------------------------------------------------------------------+
| (6) ionic-archive@1.0.0                                                      |
+------------------------------------------------------------------------------+
| id: ionic-archive                                                            |
| version: 1.0.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2017-10-18T07:25:47-07:00                                              |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[07:25:47]  * [OK] Step dependency (go) installed, available. 
(gradle) isn't installed, installing...
 * [OK] gradle installed
INFO[07:26:07]  * [OK] Step dependency (gradle) installed, available. 
Configs:
- Platform: android
- Configuration: release
- Target: device
- BuildConfig: /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__bitrise-cordova-build-config__537896201/build.json
- Options: 
- Username: 
- Username: 
- CordovaVersion: 
- IonicVersion: 
- WorkDir: /Users/vagrant/git
- DeployDir: /Users/vagrant/deploy
Installing cordova and angular plugins
$ npm "install" "@ionic/cli-plugin-ionic-angular@latest" "@ionic/cli-plugin-cordova@latest"
cordova version: 6.5.0
ionic version: 2.2.2
Building project
$ ionic "platform" "rm" "android"
******************************************************
 Dependency warning - for the CLI to run correctly,      
 it is highly recommended to install/upgrade the following:     
 Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo)
 Install ios-deploy to deploy iOS applications to devices.  `npm install -g ios-deploy` (may require sudo)
******************************************************
Error: Current working directory is not a Cordova-based project.
$ ionic "platform" "add" "android"
******************************************************
 Dependency warning - for the CLI to run correctly,      
 it is highly recommended to install/upgrade the following:     
 Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo)
 Install ios-deploy to deploy iOS applications to devices.  `npm install -g ios-deploy` (may require sudo)
******************************************************
Error: Current working directory is not a Cordova-based project.
$ ionic "build" "--release" "--device" "android" "--buildConfig" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__bitrise-cordova-build-config__537896201/build.json"
******************************************************
 Dependency warning - for the CLI to run correctly,      
 it is highly recommended to install/upgrade the following:     
 Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo)
 Install ios-deploy to deploy iOS applications to devices.  `npm install -g ios-deploy` (may require sudo)
******************************************************
> BienTonFilm@0.0.1 ionic:build /Users/vagrant/git
> ionic-app-scripts build "--release" "--device" "android" "--buildConfig" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__bitrise-cordova-build-config__537896201/build.json"
[07:26:39]  ionic-app-scripts 2.1.3 
[07:26:39]  build dev started ... 
[07:26:39]  clean started ... 
[07:26:39]  clean finished in 2 ms 
[07:26:39]  copy started ... 
[07:26:39]  transpile started ... 
[07:26:44]  transpile finished in 4.34 s 
[07:26:44]  preprocess started ... 
[07:26:44]  deeplinks started ... 
[07:26:44]  deeplinks finished in 78 ms 
[07:26:44]  preprocess finished in 83 ms 
[07:26:44]  webpack started ... 
[07:26:44]  copy finished in 4.75 s 
[07:26:56]  webpack finished in 11.71 s 
[07:26:56]  sass started ... 
[07:26:57]  sass finished in 1.49 s 
[07:26:57]  postprocess started ... 
[07:26:57]  postprocess finished in 8 ms 
[07:26:57]  lint started ... 
[07:26:57]  build dev finished in 17.68 s 
[07:27:01]  lint finished in 3.96 s 
Error: No platforms added to this project. Please use `cordova platform add <platform>`.
No ios nor android platform's output dir exist
No output generated
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | ionic-archive@1.0.0 (exit code: 1)                            | 77 sec   |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...://github.com/bitrise-community/steps-ionic-archive/issues |
| Source: https://github.com/bitrise-community/steps-ionic-archive             |
+---+---------------------------------------------------------------+----------+

Thank you in advance, I’m just starting with Bitrise !
And sorry for my bad english !

Hi @Corentin,

Thanks for creating the issue report!

From this log it seems that the working directory is not set to the correct directory.

May I ask how & when did you register the project on bitrise.io ? Did you use the automatically generated configuration options? Or did you use a manual option?

Hi,

I register the project on bitrise.io two days ago, following all the steps of adding a project.
And yes i did use the automatically generated configuration option.
The only thing, i did it’s change the stack to “Hybrid Stack, with both Android tools and Xcode 8”

1 Like

@Corentin can you please enable support access for the project and send us the app’s or build’s bitrise.io URL (either here or via email/the onsite chat if you don’t want to share the link here)?

@viktorbenei Here is my app’s URL: https://www.bitrise.io/app/13dc1df97398ce09#
Normally, I enable bitrise support access.
Thank you in advance ! :slight_smile:

1 Like

Hi @Corentin,

Checked your project and the workdir seems to be good; the issue seems to be the Ionic/Cordova CLI version. You most likely used Cordova v7 and Ionic v3, but on the stack which you selected (the Hybrid one) Cordova v6 and Ionic CLI v2 are preinstalled.

I switched your project to the Visual Studio for Mac stack, which has Cordova v7 and Ionic v3 preinstalled and the build succeeded.

Alternatively you can use the related steps’ version inputs (in this case the Ionic Archive step’s) to specify a version for the CLIs if you’d want to keep using the Hybrid/Xcode 8 stack:

Let us know if you have any questions, and Happy Building! :slight_smile:

1 Like

Thank you very much @viktorbenei !!! It works :smiley:

Thanks a lot for your help ! :slight_smile:

No problem at all :wink:

1 Like

Hi man, you can help me? I have a similar problem.

Hey @BrunoConke :wave:

Can you please create a ticket in bitrise.io or create a new #issues:build-issues post? Both lists the necessary information so we can help you the quickest.