Snapshot generation failed!

android

#1

hello
i got this error in my project when build for android with --env.snapshot

i got this error


338] . sync nonrecursive ^\.\/app\.(css|scss|less|sass)$ 174 bytes {1} [built]
[340] ../platforms/android/app/snapshot-entry.js 287 bytes {1} [built]
[667] ./app.component.html 2.66 KiB {2} [built]
[728] ./main.ts 4.3 KiB {2} [built]
    + 719 hidden modules

ERROR in NativeScriptSnapshot. Snapshot generation failed!
Target architecture: arm64-v8a
Command failed: /var/folders/_v/hg_807gn65b6xcz9v1b873lw0000gn/T/snapshot-tools/mksnapshot-tools/v8-v6.6.346.23/darwin-x64/mksnapshot-arm64 /D/nativescript/luce/platforms/android/app/src/main/assets/app/_embedded_script_.js --startup_blob /D/nativescript/luce/platforms/android/app/snapshot-build/build/snapshots/blobs/arm64-v8a/TNSSnapshot.blob --profile_deserialization

Executing webpack failed with exit code 2.
# tns build android

==========


my package is

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "com.lamassu.luce",
    "tns-android": {
      "version": "4.1.3"
    },
    "tns-ios": {
      "version": "4.1.1"
    }
  },
  "dependencies": {
    "@angular/animations": "~5.2.0",
    "@angular/common": "~5.2.0",
    "@angular/compiler": "~5.2.0",
    "@angular/core": "~5.2.0",
    "@angular/forms": "~5.2.0",
    "@angular/http": "~5.2.0",
    "@angular/platform-browser": "~5.2.0",
    "@angular/platform-browser-dynamic": "~5.2.0",
    "@angular/router": "~5.2.0",
    "nativescript-angular": "~5.3.0",
    "nativescript-app-tour": "^0.9.1",
    "nativescript-barcodescanner": "^2.7.7",
    "nativescript-carousel": "^3.1.1",
    "nativescript-fancyalert": "^1.2.0",
    "nativescript-gif": "^4.0.0",
    "nativescript-image-swipe": "^3.0.0",
    "nativescript-image-zoom": "^3.0.0",
    "nativescript-loading-indicator": "^2.4.0",
    "nativescript-ng2-slides": "0.0.11",
    "nativescript-onesignal": "^1.0.7",
    "nativescript-phone": "^1.3.1",
    "nativescript-social-share": "^1.5.0",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-sidedrawer": "^4.1.1",
    "reflect-metadata": "~0.1.10",
    "rxjs": "~5.5.5",
    "tns-core-modules": "^4.1.0",
    "tns-core-modules-widgets": "^4.1.0",
    "tns-platform-declarations": "^4.1.0",
    "zone.js": "~0.8.18"
  },
  "devDependencies": {
    "@angular-devkit/core": "~0.6.3",
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "~5.2.0",
    "@ngtools/webpack": "~6.0.3",
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "clean-webpack-plugin": "~0.1.19",
    "copy-webpack-plugin": "~4.5.1",
    "css-loader": "~0.28.11",
    "extract-text-webpack-plugin": "~3.0.2",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-dev-typescript": "~0.7.0",
    "nativescript-dev-webpack": "^0.12.0",
    "nativescript-worker-loader": "~0.9.0",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~2.3.0",
    "typescript": "~2.7.2",
    "uglifyjs-webpack-plugin": "~1.2.5",
    "webpack": "~4.6.0",
    "webpack-bundle-analyzer": "~2.13.0",
    "webpack-cli": "~2.1.3",
    "webpack-sources": "~1.1.0"
  },
  "scripts": {
    "ns-bundle": "ns-bundle",
    "publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
    "generate-android-snapshot": "generate-android-snapshot --targetArchs arm,arm64,ia32 --install",
    "start-android-bundle": "npm run ns-bundle --android --run-app",
    "start-ios-bundle": "npm run ns-bundle --ios --run-app",
    "build-android-bundle": "npm run ns-bundle --android --build-app",
    "build-ios-bundle": "npm run ns-bundle --ios --build-app"
  }
}

please help me


#2

Which version of CLI and Runtime you are using?


#3

sir iam using latest cli


#4

how can i find my current cli and runtime version ?


#5

For CLI,

tns --version

Runtime version can be found in your package.json, I can see it above already.


#6

sir the problem is solved i built with snapshot this problem was from android sdk i just updated it