Skip to content

Cannot perform Ionic build without platform. Falling back to just cordova prepare. #3653

Description

@hciyang

Description:

when run 'ionic cordova prepare' at version cli 4.1.2, I came across warning,

[WARN] Cannot perform Ionic build without platform. Falling back to just cordova prepare.

       Please supply a platform (e.g. android, ios) so the Ionic CLI can build web assets. The --no-build option can be specified to hide this warning.

this seems different from 'ionic cordova prepare' specification at https://ionicframework.com/docs/cli/cordova/prepare/

ionic cordova prepare will do the following:

Copy the www/ directory into your Cordova platforms.
Transform config.xml into platform-specific manifest files.
Copy icons and splash screens from resources/ to into your Cordova platforms.
Copy plugin files into specified platforms.

the old version, e.g. 3.20.0 seems doing it correctly with the following output

Running app-scripts build: --prod --aot --minifyjs --minifycss --optimizejs --target cordova
[00:56:15]  build prod started ...
[00:56:16]  clean started ...
[00:56:16]  clean finished in 8 ms
[00:56:16]  copy started ...
[00:56:16]  deeplinks started ...
[00:56:16]  deeplinks finished in 619 ms
[00:56:16]  ngc started ...
[00:56:40]  ngc finished in 23.22 s
[00:56:40]  preprocess started ...
[00:56:40]  preprocess finished in 1 ms
[00:56:40]  webpack started ...
[00:56:55]  copy finished in 39.53 s
[00:57:28]  webpack finished in 48.33 s
[00:57:28]  uglify started ...
[00:57:28]  sass started ...
[00:57:30]  sass finished in 1.63 s
[00:57:30]  cleancss started ...
[00:57:31]  cleancss finished in 1.53 s
[00:57:57]  uglify finished in 29.47 s
[00:57:57]  postprocess started ...
[00:57:57]  postprocess finished in 14 ms
[00:57:57]  lint started ...
[00:58:07]  lint finished in 9.55 s
[00:58:07]  build prod finished in 111.53 s

Steps to Reproduce:

get the latest CLI version 4.1.2
run command 'ionic cordova prepare'.

Output:

[WARN] Cannot perform Ionic build without platform. Falling back to just cordova prepare.

   Please supply a platform (e.g. android, ios) so the Ionic CLI can build web assets. The --no-build option can be specified to hide this warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions