question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Not able to get --watch to work in examples/debug-webpack4 (or my own project)

See original GitHub issue
  • [ x ] I’d be willing to submit the fix (if I knew how to fix it…)

Describe the bug

I recently tried to switch over a code-base that was using mocha-webpack to use mochapack. I noticed --watch stopped working when I made the switch. In order to double check that the problem wasn’t our usage, I cloned the mochapack repo and ran the test loop…all tests passed (including the watch test)…

However, I then opened up the examples/debug-webpack4 folder and ran the test loop in watch mode. Making changes to the index.test.js file did not cause the test loop to re-run.

Now maybe the example just hasn’t been updated to account for some change, or maybe there is an actual bug - I’m not really sure.

To Reproduce

  1. checkout master (git sha 7d0cbaff91b4f0b91b3e27afb342a92bea567df3 at time of filing)
  2. Run cd examples/debug-webpack4 && npm i && npm run test:watch
  3. Observe that test loop runs successfully and waits
  4. Open up the file examples/debug-webpack4/src/__tests__/index.test.js and make a change to it
  5. Observe that the test loop DOES NOT re-run.

Environment if relevant (please complete the following information):

  • OS: OSX 10.14.16
  • Node version: 11.9.0
  • Mochapack version: git sha 7d0cbaff91b4f0b91b3e27afb342a92bea567df3 (master at time of filing

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
schickmcommented, Nov 7, 2019

Fascinating, looks like you were a major version ahead. I pulled down your updates and indeed everything works as it should!

Sorry to have overlooked the yarn thing…I forgot that I could have totally different dependencies since I was running npm i.

Thanks again for being so responsive during this whole process. Now I can transition us from mocha-webpack to mochapack, and we’ll have a little more following for this library.

0reactions
larixercommented, Nov 7, 2019

@schickm The great idea about fixing peerDependencies concept with possibility of responsibility shift to the author is explained here by @arcanis: https://github.com/yarnpkg/berry/issues/417 Hopefully it will be released in Yarn 2.1 and will help relieve the pains of having singleton packages in JS ecosystem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WatchConnectivity not working on device
When debugging the WatchKit app, I see errorHandler is called on the func sendMessage(), and the error states: WatchConnectivity session on paired device...
Read more >
Not able to install apple watch app
I got what was the issue. It is the deployment target which keeps me from installing the watch app. I changed the deployment...
Read more >
Apple Watch - Set Up Cellular Service
1. During the pairing and setup process, tap Set Up Cellular on your iPhone. If you are attempting this after the initial setup...
Read more >
Apple Watch: the definitive review
The Apple Watch is Apple's first entirely-new product in five years. ... and there's no ability to load up your own watch faces...
Read more >
How to find your first open source bug to fix
How do I find an open source project where I can contribute? ... I can't guarantee that it will inspire you to stick...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found