NativeScript / nativescript-dev-webpack

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

Error: npm run start-android-bundle #97

Closed Mepk closed 7 years ago

Mepk commented 7 years ago

After npm run start-android-bundle I have an error:

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@3.10.10
3 info using node@v6.10.0
4 verbose run-script [ 'prestart-android-bundle',
4 verbose run-script   'start-android-bundle',
4 verbose run-script   'poststart-android-bundle' ]
5 info lifecycle @~prestart-android-bundle: @
6 silly lifecycle @~prestart-android-bundle: no script for prestart-android-bundle, continuing
7 info lifecycle @~start-android-bundle: @
8 verbose lifecycle @~start-android-bundle: unsafe-perm in lifecycle true
9 verbose lifecycle @~start-android-bundle: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\tmp\splustv\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\nodejs\;C:\Users\Mepk\AppData\Roaming\npm
10 verbose lifecycle @~start-android-bundle: CWD: C:\tmp\splustv
11 silly lifecycle @~start-android-bundle: Args: [ '/d /s /c', 'npm run ns-bundle --android --start-app' ]
12 silly lifecycle @~start-android-bundle: Returned: code: 1  signal: null
13 info lifecycle @~start-android-bundle: Failed to exec start-android-bundle script
14 verbose stack Error: @ start-android-bundle: `npm run ns-bundle --android --start-app`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid @
16 verbose cwd C:\tmp\splustv
17 error Windows_NT 6.1.7601
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start-android-bundle"
19 error node v6.10.0
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error @ start-android-bundle: `npm run ns-bundle --android --start-app`
22 error Exit status 1
23 error Failed at the @ start-android-bundle script 'npm run ns-bundle --android --start-app'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the  package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     npm run ns-bundle --android --start-app
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

How to fix it?

sis0k0 commented 7 years ago

Can you describe exactly the steps you make? Does this happen on a new project? Also can you share your package.json?

Mepk commented 7 years ago

There is my package.json

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "io.gda.sevenplus",
    "tns-android": {
      "version": "2.5.0"
    }
  },
  "dependencies": {
    "@angular/common": "2.4.3",
    "@angular/compiler": "2.4.3",
    "@angular/core": "2.4.3",
    "@angular/forms": "2.4.3",
    "@angular/http": "2.4.3",
    "@angular/platform-browser": "2.4.3",
    "@angular/platform-browser-dynamic": "2.4.3",
    "@angular/router": "3.4.3",
    "nativescript-angular": "1.3.0",
    "nativescript-ng2-slides": "0.0.9",
    "nativescript-push-notifications": "^0.1.2",
    "nativescript-social-share": "^1.3.2",
    "nativescript-telerik-ui": "^1.5.1",
    "nativescript-theme-core": "1.0.2",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.0.1",
    "tns-core-modules": "2.4.4"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~2.4.3",
    "@ngtools/webpack": "1.2.4",
    "babel-traverse": "6.18.0",
    "babel-types": "6.18.0",
    "babylon": "6.13.1",
    "copy-webpack-plugin": "~3.0.1",
    "extract-text-webpack-plugin": "~2.0.0-beta.4",
    "htmlparser2": "~3.9.2",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-dev-typescript": "^0.3.2",
    "nativescript-dev-webpack": "^0.3.6",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~1.6.0",
    "typescript": "~2.1.0",
    "webpack": "2.2.0",
    "webpack-sources": "~0.1.3",
    "zone.js": "~0.7.2"
  },
  "scripts": {
    "ns-bundle": "ns-bundle",
    "start-android-bundle": "npm run ns-bundle --android --start-app",
    "start-ios-bundle": "npm run ns-bundle --ios --start-app",
    "build-android-bundle": "npm run ns-bundle --android --build-app",
    "build-ios-bundle": "npm run ns-bundle --ios --build-app"
  }
}
sis0k0 commented 7 years ago

I couldn't reproduce the error. Can you send your application? Also can you describe your environment - os, node and npm versions?

sis0k0 commented 7 years ago

Hey @Mepk,

I still cannot reproduce that error neither on mac, nor on linux. If you still see that problem, you can try upgrading your nativescript-angular version to 1.4 and tns-core-modules to 2.5. Feel free to reopen.

carrbrpoa commented 7 years ago

Hello,

I'm not being able to bundle (run npm run start-android-bundle) too. I'm new to NativeScript (and TS) and it's occurring with the complete Groceries tutorial app.

Some errors and warnings before finishing in console:

...
 [165] ./app.css 41 bytes {2} [built]
 [178] ./main.ts 401 bytes {1} [built]
 [179] ./vendor.ts 484 bytes {0} [built]
 [257] ../~/nativescript-css-loader/lib/css-base.js 1.51 kB [built]
    + 243 hidden modules

WARNING in ./app.css
(Emitted value instead of an instance of Error)   resolve-url-loader cannot operate: CSS error
  C:\Android\Projetos\Groceries\app\app.css:6:44: property missing ':'
  at error (C:\Android\Projetos\Groceries\node_modules\css\lib\parse\index.js:62:15)

ERROR in ENOENT: no such file or directory, open 'C:\Android\Projetos\Groceries\app\pages\login\pages\login\login.html'
Child extract-text-webpack-plugin:
       [0] ../~/nativescript-css-loader/lib/css-base.js 1.51 kB {0} [built]
       [1] ../~/resolve-url-loader!../~/nativescript-css-loader!../~/nativescript-dev-webpack/platform-css-loader.js!./app.css 496 bytes {0} [built] [1 warning]

    WARNING in ../~/resolve-url-loader!../~/nativescript-css-loader!../~/nativescript-dev-webpack/platform-css-loader.js!./app.css
    (Emitted value instead of an instance of Error)   resolve-url-loader cannot operate: CSS error
      C:\Android\Projetos\Groceries\app\app.css:6:44: property missing ':'
      at error (C:\Android\Projetos\Groceries\node_modules\css\lib\parse\index.js:62:15)
child process exited with code 2
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ ns-bundle: `ns-bundle`
npm ERR! Exit status 2
...

package.json:

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.Groceries",
    "tns-android": {
      "version": "3.0.0"
    }
  },
  "dependencies": {
    "@angular/animations": "~4.0.0",
    "@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",
    "email-validator": "^1.0.7",
    "nativescript-angular": "~3.0.0",
    "nativescript-social-share": "^1.3.2",
    "nativescript-theme-core": "~1.0.4",
    "reflect-metadata": "~0.1.8",
    "rxjs": "~5.2.0",
    "tns-core-modules": "~3.0.0",
    "zone.js": "0.8.2"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~4.0.0",
    "@ngtools/webpack": "1.3.1",
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "copy-webpack-plugin": "~4.0.1",
    "extract-text-webpack-plugin": "~2.1.0",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-dev-android-snapshot": "^0.*.*",
    "nativescript-dev-typescript": "^0.4.0",
    "nativescript-dev-webpack": "^0.4.2",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~2.0.2",
    "typescript": "~2.2.1",
    "webpack": "~2.4.1",
    "webpack-sources": "~0.2.3"
  },
  "scripts": {
    "ns-bundle": "ns-bundle",
    "start-android-bundle": "npm run ns-bundle --android --start-app",
    "start-ios-bundle": "npm run ns-bundle --ios --start-app",
    "build-android-bundle": "npm run ns-bundle --android --build-app",
    "build-ios-bundle": "npm run ns-bundle --ios --build-app"
  }
}

NPM's debug log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'ns-bundle',
1 verbose cli   '--android',
1 verbose cli   '--start-app' ]
2 info using npm@4.6.1
3 info using node@v6.3.1
4 verbose run-script [ 'prens-bundle', 'ns-bundle', 'postns-bundle' ]
5 info lifecycle @~prens-bundle: @
6 silly lifecycle @~prens-bundle: no script for prens-bundle, continuing
7 info lifecycle @~ns-bundle: @
8 verbose lifecycle @~ns-bundle: unsafe-perm in lifecycle true
9 verbose lifecycle @~ns-bundle: PATH: C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Android\Projetos\Groceries\node_modules\.bin;C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Android\Projetos\Groceries\node_modules\.bin;C:\oracle\product\11.2.0\client_1\bin;C:\Python27\ArcGIS10.3;C:\Python27\ArcGIS10.3\Scripts;C:\Progra~1\Java\jdk1.8.0_40\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Boundless\OpenGeo\jetty\jre\bin;C:\Program Files (x86)\Boundless\OpenGeo\bin;C:\Program Files (x86)\Boundless\OpenGeo\sdk\bin;C:\Program Files (x86)\Boundless\OpenGeo\pgsql\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Skype\Phone\;C:\apache-maven-3.3.3\bin;C:\Program Files (x86)\apache-ant-1.9.4\bin;C:\Program Files\PostgreSQL\9.4\bin;C:\db-derby-10.11.1.1-bin\bin;C:\Program Files\MongoDB\Server\3.4\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\cURL\bin;C:\Program Files (x86)\Git\cmd;C:\Users\cesar.ribeiro\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files (x86)\Common Files\ArcGIS\bin;C:\Program Files (x86)\Log Parser 2.2;C:\oracle\instantclient_12_1;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;c:\Program Files (x86)\Git\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\nodejs\;C:\gdal210\bin;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenSSH-Win64;C:\Users\cesar.ribeiro\AppData\Local\Continuum\Anaconda2;C:\Users\cesar.ribeiro\AppData\Local\Continuum\Anaconda2\Scripts;C:\Users\cesar.ribeiro\AppData\Local\Continuum\Anaconda2\Library\bin;C:\Ruby22-x64\bin;C:\Program Files\Docker Toolbox;C:\Program Files (x86)\Nmap;C:\Users\cesar.ribeiro\AppData\Roaming\npm;C:\gdal210\bin;C:\Users\cesar.ribeiro\AppData\Local\.meteor\;C:\Program Files (x86)\Microsoft VS Code\bin;.;;.;
10 verbose lifecycle @~ns-bundle: CWD: C:\Android\Projetos\Groceries
11 silly lifecycle @~ns-bundle: Args: [ '/d /s /c', 'ns-bundle' ]
12 silly lifecycle @~ns-bundle: Returned: code: 2  signal: null
13 info lifecycle @~ns-bundle: Failed to exec ns-bundle script
14 verbose stack Error: @ ns-bundle: `ns-bundle`
14 verbose stack Exit status 2
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:852:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid @
16 verbose cwd C:\Android\Projetos\Groceries
17 verbose Windows_NT 6.3.9600
18 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ns-bundle" "--android" "--start-app"
19 verbose node v6.3.1
20 verbose npm  v4.6.1
21 error code ELIFECYCLE
22 error errno 2
23 error @ ns-bundle: `ns-bundle`
23 error Exit status 2
24 error Failed at the @ ns-bundle script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 2, true ]

Windows 8.1 64bits

sis0k0 commented 7 years ago

Hey @carrbrpoa,

Your templateUrls should be relative instead of absolute. I think that the problem is in your ./app/login/login.component.ts file. The templateUrl there should be ./login.component.html. This applies also to your styleUrls.

carrbrpoa commented 7 years ago

Hey @sis0k0, thanks for the fast reply. Tried your suggestion, but seems that the same error occurs. See my component file:

image

I also tried ./app/pages/login/login.html, but that way the login page isn't displayed anymore (runtime exception).

sis0k0 commented 7 years ago

Yeah, you need to add moduleId: module.id in the component metadata too.

carrbrpoa commented 7 years ago

Like this:

image

?

The same problem occurs:

image

That ...app\pages\login\pages\login\login.html really doesn't exists, the correct should be ...app\pages\login\login.html. I don't know why it's trying to use that way :(

sis0k0 commented 7 years ago

I meant, relative to the directory of the current file. Since login.component.ts and login.html are in the same folder:

templateUrl: "./login.html",
styleUrls: [ "./login-common.css", "login.css" ],
carrbrpoa commented 7 years ago

Great, that's it. Now I found "No NgModule metadata found for 'AppModule'" but also found another issue with the same. :)

Thanks for your help!

sis0k0 commented 7 years ago

Probably it's a missing main.aot.ts file. See the last comment in that issue ;)

carrbrpoa commented 7 years ago

Probably it's a missing main.aot.ts file. See the last comment in that issue ;)

Bingo, that was it! Thanks! 💯

vijaykumar5050 commented 6 years ago

Not able to run web pack ----- npm run start-android-bundle

@ start-android-bundle D:\VijayMobile\call-a-doc npm run ns-bundle --android --run-app

npm WARN invalid config loglevel="notice"

@ ns-bundle D:\VijayMobile\call-a-doc ns-bundle

Using npm run scripts is no longer supported. Use CLI commands and pass the --bundle flag instead. Example: tns build android --bundle npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ ns-bundle: ns-bundle npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ ns-bundle script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\vijaykumar_n\AppData\Roaming\npm-cache_logs\2017-12-14T13_13_57_475Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ start-android-bundle: npm run ns-bundle --android --run-app npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ start-android-bundle script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\vijaykumar_n\AppData\Roaming\npm-cache_logs\2017-12-14T13_13_57_507Z-debug.log

vijaykumar5050 commented 6 years ago

Here is my package.json

{ "description": "NativeScript Application", "license": "SEE LICENSE IN ", "readme": "NativeScript Application", "repository": "", "nativescript": { "id": "com.test.TestProject", "tns-ios": { "version": "3.0.0" }, "tns-android": { "version": "3.3.1" } }, "scripts": { "tslint": "tslint -p tsconfig.json", "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" }, "dependencies": { "@angular/animations": "~4.1.0", "@angular/common": "~4.1.0", "@angular/compiler": "~4.1.0", "@angular/core": "~4.1.0", "@angular/forms": "~4.1.0", "@angular/http": "~4.1.0", "@angular/platform-browser": "~4.1.0", "@angular/router": "~4.1.0", "nativescript-angular": "~3.0.0", "nativescript-camera": "^3.0.1", "nativescript-drop-down": "^3.1.0", "nativescript-google-maps-sdk": "^2.3.2", "nativescript-imagepicker": "^3.0.6", "nativescript-loading-indicator": "^2.3.2", "nativescript-phone": "^1.3.1", "nativescript-pro-ui": "^3.2.0", "nativescript-ripple": "^2.0.0", "nativescript-theme-core": "~1.0.2", "nativescript-xml2js": "^0.5.2", "reflect-metadata": "~0.1.8", "rxjs": "~5.3.0", "tns-core-modules": "~3.0.0", "zone.js": "~0.8.2" }, "devDependencies": { "@angular/compiler-cli": "~4.1.0", "@ngtools/webpack": "^1.3.0", "babel-traverse": "6.24.1", "babel-types": "6.24.1", "babylon": "6.17.1", "codelyzer": "^3.0.1", "copy-webpack-plugin": "~4.0.1", "extract-text-webpack-plugin": "~2.1.0", "filewalker": "^0.1.3", "jasmine-core": "^2.6.2", "karma": "^1.7.0", "karma-jasmine": "^1.0.2", "karma-nativescript-launcher": "^0.4.0", "lazy": "1.0.11", "nativescript-css-loader": "~0.26.0", "nativescript-dev-typescript": "~0.4.0", "nativescript-dev-webpack": "next", "raw-loader": "~0.5.1", "resolve-url-loader": "~2.0.2", "tslint": "^5.4.2", "typescript": "~2.2.1", "webpack": "~2.6.1", "webpack-bundle-analyzer": "^2.8.2", "webpack-sources": "~1.0.1", "nativescript-worker-loader": "~0.8.1" } }

MuhammadTahir92 commented 6 years ago

@sis0k0 i got error after this command npm run start-android-bundle image

logs are as fallow's 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 ]

My package.json is { "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" } }

carrbrpoa commented 6 years ago

Muhammad I think now there's a new set of commands to bundle: https://docs.nativescript.org/best-practices/bundling-with-webpack

On Jan 25, 2018 11:54, "MuhammadTahir92" notifications@github.com wrote:

@sis0k0 https://github.com/sis0k0 i got error after this command npm run start-android-bundle [image: image] https://user-images.githubusercontent.com/25048331/35391595-f6aeaadc-0200-11e8-945a-042056106618.png

logs are as fallow's 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\nodemodules\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\nodemodules\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\nodemodules\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\nodemodules\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\nodemodules\read-package-json\read-json.js:160:5) 4 verbose stack at C:\Users\TAHIR\AppData\Roaming\nvm\v8.9.1\node modules\npm\nodemodules\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 ]

My package.json is { "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": { "": "~4.4.1", "": "~4.4.1", "": "~4.4.1", "": "~4.4.1", "": "~4.4.1", "": "~4.4.1", "": "~4.4.1", "": "~4.4.1", "": "^4.14.91", "": "^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": { "": "~4.4.1", "": "~1.9.1", "": "^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" } }

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NativeScript/nativescript-dev-webpack/issues/97#issuecomment-360472628, or mute the thread https://github.com/notifications/unsubscribe-auth/AJvVCtI3GKOWG3q--SKFKaX7rRaopOWBks5tOIeCgaJpZM4MXE6l .

MuhammadTahir92 commented 6 years ago

Thanks for that issue @carrbrpoa this issue is solved but now i get this error image

ngtools_api_1.readConfiguration is not a function what doest that mean?

carrbrpoa commented 6 years ago

@MuhammadTahir92 Seems someone pointed that issue in angular-cli repo: https://github.com/angular/angular-cli/issues/8287