NativeScript / nativescript-dev-webpack

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

npm ERR! missing script: start-android-bundle #422

Closed MuhammadTahir92 closed 6 years ago

MuhammadTahir92 commented 6 years ago

image

Package.json { "name": "tradelive", "version": "1.0.0", "description": "NativeScript Application", "license": "SEE LICENSE IN ", "readme": "NativeScript Application", "repository": "", "nativescript": { "id": "org.nativescript.tradelivemobile", "tns-android": { "version": "3.4.1" } }, "scripts": { "tslint": "tslint -p tsconfig.json" }, "dependencies": { "@angular/animations": "~4.4.1", "@angular/common": "~4.4.1", "@angular/compiler": "~4.4.1", "@angular/core": "~4.4.1", "@angular/forms": "~4.4.1", "@angular/http": "~4.4.1", "@angular/platform-browser": "~4.4.1", "@angular/router": "~4.4.1", "@types/lodash": "^4.14.91", "@wwwalkerrun/nativescript-ngx-magic": "^2.0.4", "angular2-jwt": "^0.2.3", "js-data": "^3.0.1", "js-data-http": "^3.0.0", "lodash": "^4.17.4", "nativescript-angular": "~4.4.1", "nativescript-badge-button": "^0.1.2", "nativescript-barcodescanner": "^2.7.4", "nativescript-bottombar": "^3.0.7", "nativescript-checkbox": "^3.0.3", "nativescript-exit": "^1.0.1", "nativescript-feedback": "^1.1.0", "nativescript-floatingactionbutton": "^4.1.3", "nativescript-loading-indicator": "^2.4.0", "nativescript-localstorage": "^1.1.5", "nativescript-material-icons": "^1.0.3", "nativescript-ng-shadow": "^2.1.0", "nativescript-ng2-fonticon": "^1.3.4", "nativescript-ngx-fonticon": "^4.0.0", "nativescript-permissions": "^1.2.3", "nativescript-pro-ui": "^3.2.0", "nativescript-ripple": "^2.0.0", "nativescript-snackbar": "^2.0.0", "nativescript-theme-core": "~1.0.2", "nativescript-toast": "^1.4.6", "reflect-metadata": "~0.1.8", "rxjs": "~5.4.2", "tns-core-modules": "^3.4.0", "zone.js": "~0.8.2" }, "devDependencies": { "@angular/compiler-cli": "~4.4.1", "@ngtools/webpack": "~1.9.1", "@types/jasmine": "^2.8.2", "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", "codelyzer": "^4.0.2", "copy-webpack-plugin": "~4.3.0", "css-loader": "~0.28.7", "extract-text-webpack-plugin": "~3.0.2", "lazy": "1.0.11", "nativescript-dev-typescript": "~0.5.0", "nativescript-dev-webpack": "^0.9.1", "nativescript-worker-loader": "~0.8.1", "raw-loader": "~0.5.1", "resolve-url-loader": "~2.2.1", "tslint": "^5.8.0", "typescript": "^2.4.2", "uglifyjs-webpack-plugin": "~1.1.6", "webpack": "~3.10.0", "webpack-bundle-analyzer": "^2.9.1", "webpack-sources": "~1.1.0" } }

logs 0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'start-android-bundle' ] 2 info using npm@5.5.1 3 info using node@v8.9.1 4 verbose stack Error: missing script: start-android-bundle 4 verbose stack at run (C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\lib\run-script.js:151:19) 4 verbose stack at C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\lib\run-script.js:61:5 4 verbose stack at C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\read-package-json\read-json.js:115:5 4 verbose stack at C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\nodemodules\read-package-json\read-json.js:402:5 4 verbose stack at checkBinReferences (C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\read-package-json\read-json.js:357:45) 4 verbose stack at final (C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\read-package-json\read-json.js:400:3) 4 verbose stack at then (C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\read-package-json\read-json.js:160:5) 4 verbose stack at C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\read-package-json\read-json.js:348:12 4 verbose stack at C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16 4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3) 5 verbose cwd D:\projects\troutBird\nativescriptData\nativescript 6 verbose Windows_NT 10.0.16299 7 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "start-android-bundle" 8 verbose node v8.9.1 9 verbose npm v5.5.1 10 error missing script: start-android-bundle 11 verbose exit [ 1, true ]

what to do at this point?

sis0k0 commented 6 years ago

Hey @MuhammadTahir92, since v0.9.1 of the nativescript-dev-webpack plugin you need to use tns run android --bundle in order to bundle your app with webpack. However, there are a few other steps that you need to take in order to upgrade to v0.9.1. Please, take a look at that migration document: https://www.nativescript.org/blog/nativescript-webpack-0.9.0-what-changed-and-how-to-upgrade.