NativeScript / nativescript-cli

Command-line interface for building NativeScript apps
https://www.npmjs.com/package/nativescript
Apache License 2.0
1.03k stars 195 forks source link

[NS7] Initial project fails to build production release #5393

Open mohammadrafigh opened 4 years ago

mohammadrafigh commented 4 years ago

Environment

Describe the bug running ns build android --release --env.snapshot --env.compileSnapshot --env.uglify --keyStorePath <KEYSTORE> --keyStorePassword <PASSWORD> --keyStoreAlias <ALIAS> --keyStoreAliasPassword <PASSWORD> --aab

throws

/test-project/node_modules/webpack-cli/bin/cli.js:93
                throw err;
                ^

Error: In order to generate a V8 snapshot you must have the "android" platform installed - to do so please run "tns platform add android".
    at NativeScriptSnapshotPlugin.ProjectSnapshotGenerator.validateAndroidRuntimeVersion (/test-project/node_modules/@nativescript/webpack/snapshot/android/project-snapshot-generator.js:124:15)

Adding this to package.json resolves the error but I think it's not intended to be like that in NS7:

  "nativescript": {
    "id": "io.thisapp.thisappmap",
    "tns-android": {
      "version": "7.0.0"
    }
  },

To Reproduce

sohetma commented 4 years ago

I get the same issue with : "tns-ios": { "version": "6.5.2" },

farfromrefug commented 4 years ago

it think it is the same issue as this one https://github.com/NativeScript/nativescript-cli/issues/5391

mohammadrafigh commented 4 years ago

@farfromrefug I don't think it's the same issue.