Closed oculus42 closed 5 years ago
Hey! This is a great tool. It does indeed make the other developers at work happy. 😄
😁 I'm glad to hear!
Unfortunately, getting the development environment is a little messy, never got around to automating that. You will need to npm install
in a few places for it to work (look at travis.yml
for an idea). A monstrous invocation like this should do it:
npm install --ignore-scripts &&
(cd upstream/webpack1; npm install) &&
(cd upstream/webpack2; npm install) &&
(cd upstream/webpack3; npm install) &&
(cd upstream/webpack4; npm install) &&
(cd packages/@happypack/example-utils; npm install --ignore-scripts) &&
(cd packages/@happypack/test-utils; npm install --ignore-scripts) &&
(cd packages/@happypack/webpack-config-composer; npm install --ignore-scripts)
I just tried it on a fresh clone of the project and it worked. If you're curious:
upstream/*
contains different webpack versions (targets) that happypack is tested againstpackages/@happypack/example-utils
contains a few helper functions / constants needed to define the examples (again, because they're run against multiple targets)packages/@happypack/test-utils
is straightforward, contains test utilitiespackages/@happypack/webpack-config-composer
is used by tests to generate a configuration for the current webpack version being targetedLet me know if there's anything else!
Thanks for the quick response! I'm still getting the error, even after a git reset HEAD --hard && git clean -fdx
to ensure I was back at the start, and running the scripts.
I'll try from another computer or two on the probability that my current system is the problem.
Hmm, strange. It may be worthwhile to re-clone the repository altogether, since you've installed some npm packages locally (and git clean
won't reach those.)
Can you show me the commands you're using & the output?
git clean -fdx
will remove the node_modules folders as well, but I started fresh on another Mac (macOS 10.14.2, node 10.3.0, npm 6.1.0).
I cloned, ran the install script you provided, then npm run test:examples
and it still fails the same way. Attached is the output of the failing webpack@2 cache-loader
test.
I will try a PC, next.
Minor progress update: PC, even with git-bash.exe, was a failure. It can't handle the scripts. I haven't gone as far as installing cygwin, but I can give that a try if you think it's worth it. I'm going back to my Mac, today and giving it another try.
It's a legit issue -- let me push up a patch tonight along with some documentation
@oculus42 see #250 when you can and let me know if it fixes it for you
That works!
I did experience a timeout error during npm run test:coverage
for webpack 4.6.0, but I think that was just a side-effect of the corporate AV going crazy about all the new node_modules
folders. It was fine after a re-run.
You might also consider moving to the prepublishOnly
script, to avoid errors on an initial npm install
. It would require using npm 4+ for publishing, though. I found an article that might help: Safely Migrating Away From "prepublish" with npm 4
I did experience a timeout error during npm run test:coverage for webpack 4.6.0, but I think that was just a side-effect of the corporate AV going crazy about all the new node_modules folders. It was fine after a re-run.
😁 funny, I've had exactly the same thing a few months ago.
You might also consider moving to the prepublishOnly script, to avoid errors on an initial npm install.
Good call, will look into it. Thanks for the contributions and the troubleshooting!
Hey! This is a great tool. It does indeed make the other developers at work happy. :smile:
I pulled the repo down and attempted to poke around, but am stopped by an error on
npm install
. Can you provide any direction on what I might do to get the install/prepublish actions working?I've tried to document my process thoroughly enough to follow. Working on macOS 10.13.6.
So I installed
sinon
, and it asked forchai
. Theninvariant
, andfs-extra
, at which point it ran... and complained that sinon has deprecatedsandbox.create()
, and then failed 13 tests with:I backed through the Sinon versions until I got to
sinon@2.4.1
which ran...but threw an error.That was on Node 10.8.0. I backed up to 8.9.4, then 6.11.5, just in case. All failed the same way.
I tried a couple of adjustments to
examples/cache-loader/versions/2/package.json
but to no avail.Any thoughts?