josephfrazier / reported-web

Web front-end for https://twitter.com/Reported_NYC: https://reported-web.herokuapp.com
https://reported-web.herokuapp.com
MIT License
10 stars 1 forks source link

Upgrade sharp dependency to fix `yarn install`, upgrade Jest to fix `sharp` importing `node:util` #529

Closed josephfrazier closed 4 months ago

josephfrazier commented 4 months ago

I was getting an error from yarn install, and sharp's installation issue template reminded me to use the most recent version, and that did the trick. I haven't yet verified that everything still works (namely rotating and resizing images), but I looked at the changelog and didn't notice any relevant breaking changes.

Closes https://github.com/josephfrazier/reported-web/pull/476

josephfrazier commented 4 months ago

The tests are failing with:

FAIL src/alpr.test.js
  ● Test suite failed to run

    Cannot find module 'node:util' from 'constructor.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:221:17)
      at Object.<anonymous> (node_modules/sharp/lib/constructor.js:6:14)

which seems to be a bug in jest-resolve, so I think we might need to upgrade it by way of upgrading jest first, see https://github.com/josephfrazier/reported-web/pull/476