psych-ds/pds-2020-validator-prototype

yarn install - CONFLICT WITH YARN v2 fsevents 'cannot apply hunk#1' errors on yarn function during install

Opened this issue · 8 comments

I'm working on installing the validator for regex development, and have hit a snag. After:

  • installing Xcode,
  • making my /usr/local/ writeable (thanks to Catalina issues)
  • running brew install yarn successfully
  • running yarn set version berry following instructions here

I am attempting to run the next setup steps, yarn. The first time, I got many error messages. The next time, I got the implicit dependency warnings that the setup guide mentions, but then got the following critical errors as well. Anyone know what I'm missing? Here's the output I'm seeing:

Admins-MacBook-Air-3:validator-prototype melissakline$ yarn
➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ evp_bytestokey@npm:1.0.3: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ nan@npm:2.14.0: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @typescript-eslint/eslint-plugin@npm:2.3.0 [5ecf8] doesn't provide typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta requested by tsutils@npm:3.17.1
➤ YN0002: │ psychds-validator@workspace:validator-web doesn't provide jquery@1.9.1 - 3 requested by bootstrap@npm:4.3.1
➤ YN0002: │ psychds-validator@workspace:validator-web doesn't provide popper.js@^1.14.7 requested by bootstrap@npm:4.3.1
➤ YN0000: └ Completed in 10.13s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e can't be found in the cache and will be fetched from the disk
➤ YN0001: │ Error: fsevents@patch:fsevents@npm%3A2.0.7#builtin<compat/fsevents>::version=2.0.7&hash=e8cd9e: Cannot apply hunk #1
    at c (/Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:58:888997)
    at runMicrotasks (<anonymous>)
 at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:58:891128
    at async o (/Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:58:888280)
    at async Object.t.applyPatchFile (/Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:58:891101)
    at async t.PatchFetcher.patchPackage (/Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:58:888035)
    at async /Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:58:887292
    at async /Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:36:570234
    at async /Users/melissakline/Documents/NON-COS/validator-prototype/.yarn/releases/yarn-berry.js:36:570177
➤ YN0000: └ Completed in 1.37s
➤ YN0000: Failed with errors in 11.51s

(I am keeping track of my troubleshooting steps so I can add some more hints to the guide, but will wait until I have a functioning install to do that!)

Hej Melissa,

could you post the results of node --version and yarn --version? Thanks a bunch!

-Felix

(it looks like you're on yarn 2, which I haven't tested, I'll need to figure out how things work with that 🤔)

Ok, so upgrading to yarn v2 works for me, on node v13.6.0

$ yarn
➤ YN0000: ┌ Resolution step
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ fsevents@npm:2.0.7: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ evp_bytestokey@npm:1.0.3: Implicit dependencies on node-gyp are discouraged
➤ YN0032: │ nan@npm:2.14.0: Implicit dependencies on node-gyp are discouraged
➤ YN0002: │ @typescript-eslint/eslint-plugin@npm:2.3.0 [5ecf8] doesn't provide typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta requested by tsutils@npm:3.17.1
➤ YN0002: │ psychds-validator@workspace:validator-web doesn't provide jquery@1.9.1 - 3 requested by bootstrap@npm:4.3.1
➤ YN0002: │ psychds-validator@workspace:validator-web doesn't provide popper.js@^1.14.7 requested by bootstrap@npm:4.3.1
➤ YN0000: └ Completed in 12.9s
➤ YN0000: ┌ Fetch step
➤ YN0013: │ yargs-parser@npm:10.1.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs-parser@npm:13.1.1 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:12.0.2 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:13.2.4 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ yargs@npm:13.3.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 1m
➤ YN0000: ┌ Link step
➤ YN0031: │ One or more node_modules have been detected and will be removed. This operation may take some time.
➤ YN0007: │ core-js-pure@npm:3.2.1 must be built because it never did before or the last one failed
➤ YN0007: │ fsevents@patch:fsevents@npm%3A1.2.9#builtin<compat/fsevents>::version=1.2.9&hash=77dfe6 must be built because it never did before or the last one failed
➤ YN0007: │ core-js@npm:3.2.1 must be built because it never did before or the last one failed
➤ YN0007: │ core-js@npm:2.6.9 must be built because it never did before or the last one failed
➤ YN0009: │ fsevents@patch:fsevents@npm%3A1.2.9#builtin<compat/fsevents>::version=1.2.9&hash=77dfe6 couldn't be built successfully (exit code 1, logs can be found here: /var/folders/rx/vw33hdns6r3fqmn388jsxz7c0000gn/T/logfile-752081xf7XMmRuy50.log)
➤ YN0000: └ Completed in 32.09s
➤ YN0000: Done with warnings in 1.75m

Ok, I'm getting some build issues even after the upgrade 😩 I'm not super-sure we should upgrade to yarn v2, which is brand new right now, and we'll need to upgrade everyone working on the project 🤔.

Ok, a couple notes:

  • I've given this three hours now, and I'm going to pull the plug on yarn v2. For the sake of my mental health, I beg you please to downgrade to v1 for now, and let's revisit this later. There is talk of yarn rolling back a couple of their v2 changes in their v2.1 release, let's wait until that's through.
  • Everything builds fine for me with yarn v1 -- I've updated the dependencies and tested the build, and everything looks ok and ready for further development from where I'm at (there is an outdated dependency in the validator-local directory, but that affects only the UI-based validator, so @axrhart will need to fix that).
  • It sounds like you've gone through a lot of effort to install node and yarn. I personally have never done either through brew -- I tend to use the node version manager for node, and install it and yarn through the command-line install scripts they provide. This has worked well for me in the past -- it might be worth a try; please let us know how this goes for you.

Sincere apologies for the briefness of all this, I hope this makes any sense. Exhaustedly yours,

-Felix

Absolutely!! Consider yarn v2 gone. Thank you for your work on this! If I make progress, I'll add some instructions to the README

So did yarn v1 work for you? (because I'm guessing this might as well be a fsevents issue 🤔)

Many thanks @mekline, for the readme update! I'm marking this wontfix for now, until the situation around yarn becomes clearer.

I hope all is well with you and yours, stay safe!