Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-*-bundle gets stuck at nativescript-unit-test-runner hook in NS 3.2 #3164

Closed
dbenninger opened this issue Oct 18, 2017 · 8 comments · Fixed by #3212
Closed

build-*-bundle gets stuck at nativescript-unit-test-runner hook in NS 3.2 #3164

dbenninger opened this issue Oct 18, 2017 · 8 comments · Fixed by #3212
Assignees
Milestone

Comments

@dbenninger
Copy link

Tell us about the problem

The commands npm run build-android-bundle and npm run build-ios-bundle get stuck at the nativescript-unit-test-runner hook and never fail or complete in NS 3.2:

npm run build-ios-bundle

> @ build-ios-bundle /Users/davidbenninger/Desktop/Test
> npm run ns-bundle --ios --build-app


> @ ns-bundle /Users/davidbenninger/Desktop/Test
> ns-bundle

Running tns prepare...
Executing before-prepare hook from /Users/davidbenninger/Desktop/Test/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (ios)
Executing after-prepare hook from /Users/davidbenninger/Desktop/Test/hooks/after-prepare/nativescript-unit-test-runner.js

a normal tns run ... seems to work fine.

Which platform(s) does your issue occur on?

with iOS and Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.2.1
  • Cross-platform modules: 3.2.0
  • Runtime(s): 3.2.0
  • Plugin(s): "nativescript-unit-test-runner": "^0.3.4"

To reproduce:

  1. tns create Test --template ng
  2. cd Test
  3. npm install --save-dev nativescript-dev-webpack
  4. npm install
  5. tns test init -> select "jasmine"
  6. npm run build-android-bundle
@NickIliev
Copy link
Contributor

@dbenninger thank you for reporting this issue - confirming this as a bug.
Steps to reproduce: use the ones described in the thread above!

@dbenninger
Copy link
Author

@NickIliev this blocks us from upgrading. Any news on this?

@NickIliev
Copy link
Contributor

NickIliev commented Oct 25, 2017

@dbenninger we are currently looking into it but meanwhile as the plugin nativescript-unit-test-runner is used mainly in development, perhaps you can remove the plugin (and the hooks) before bundling with WebPack (temporary solution)

Contact me at the community slack (user: niki_iliev, slack: nativescriptcommunity) so we could discuss another workflow.

@NickIliev NickIliev removed the webpack label Oct 25, 2017
@renestalder
Copy link

Anyone can post the concrete "workaround" here, maybe with code examples?

@dbenninger
Copy link
Author

@renestalder Our workaround is to remove the unit test plugin before running the bundle build:

tns plugin remove nativescript-unit-test-runner

@renestalder
Copy link

Thank you. :)

I'm not that used to the whole tns cli possibilities yet.

@jevenson
Copy link

jevenson commented Nov 7, 2017

@renestalder I've just been deleting the file at hooks/after-prepare/nativescript-unit-test-runner.js and then reverting the changes with git once I'm done using bundling.

@rosen-vladimirov
Copy link
Contributor

Hey all, a fix is available in CLI's next version (npm i -g nativescript@next), can you please give it a try and see if it resolves the issue on your side?
Also we plan to release the fix in a 3.3.1 version of NativeScript CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants