NativeScript / nativescript-dev-webpack

A package to help with webpacking NativeScript apps.
Apache License 2.0
97 stars 49 forks source link

Webpack bundling fails #226

Closed Shifs closed 6 years ago

Shifs commented 7 years ago

I have configured webpack in my nativescript project as teh splash screenw as taking a lot of time . But the build is getting failed.

Package.json
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.sai",
"tns-android": {
"version": "3.1.1"
}
},
"dependencies": {
"@angular/common": "4.0.0",
"@angular/compiler": "4.0.0",
"@angular/core": "4.0.0",
"@angular/forms": "4.0.0",
"@angular/http": "4.0.0",
"@angular/platform-browser": "4.0.0",
"@angular/platform-browser-dynamic": "4.0.0",
"@angular/router": "4.0.0",
"crypto-js": "^3.1.9-1",
"lodash": "^4.17.4",
"nativescript-angular": "~1.5.0",
"nativescript-angular-snapshot": "1.5.2-5.5.372.32",
"nativescript-autocomplete": "^1.0.0",
"nativescript-background-http": "^3.0.0",
"nativescript-bottombar": "^3.0.0",
"nativescript-checkbox": "^1.2.8",
"nativescript-downloadmanager": "^0.1.0",
"nativescript-drop-down": "^1.5.5",
"nativescript-file-picker": "0.0.2",
"nativescript-floatingactionbutton": "^2.2.7",
"nativescript-geolocation": "0.0.13",
"nativescript-google-maps-sdk": "^1.4.1",
"nativescript-imagepicker": "^2.2.7",
"nativescript-permissions": "^1.2.3",
"nativescript-radiobutton": "^0.1.0",
"nativescript-theme-core": "~1.0.2",
"nativescript-toast": "^1.4.5",
"ng2-translate": "^5.0.0",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.2.0",
"sha256": "^0.2.0",
"tns-core-modules": "^2.5.2",
"zone.js": "~0.8.5"
},
"devDependencies": {
"@angular/compiler-cli": "4.0.0",
"@ngtools/webpack": "1.2.13",
"babel-traverse": "6.24.1",
"babel-types": "6.24.1",
"babylon": "6.17.0",
"copy-webpack-plugin": "~4.0.1",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-android-snapshot": "^0.*.*",
"nativescript-dev-typescript": "^0.3.5",
"nativescript-dev-webpack": "^0.7.3",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.1.0",
"typescript": "~2.1.0",
"webpack": "^1.13.2",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-dev-server": "^2.5.1",
"webpack-sources": "~1.0.1"
},
"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"
  }

Output

Running tns prepare...
Copying template files...
 ◟ Installing tns-androidInstalling  tns-android
TypeError: Cannot read property '0' of undefined
# prepare

┌─────────┬───────────────────────┐
│ Usage   │ Synopsis              │
│ General │ $ tns prepare android │
└─────────┴───────────────────────┘

Copies common and relevant platform-specific content from the app directory to the subdirectory fo
r the selected target platform
in the platforms directory. This lets you build the project with the SDK for the selected platform
.

child process exited with code 127
sis0k0 commented 7 years ago

Seems like a duplicate of #221. Try running tns platform add before bundling.

dtopuzov commented 7 years ago

Can we detect missing platform and show error message before we start building?

NickIliev commented 6 years ago

Closing due to inactivity