httptoolkit / httptoolkit-ui

The UI of HTTP Toolkit
https://httptoolkit.com
GNU Affero General Public License v3.0
288 stars 107 forks source link

Doesn't work with latest npm v17? #33

Closed shirshak55 closed 2 years ago

shirshak55 commented 2 years ago
httptoolkit-ui via  v17.0.1 took 39s ➜  npm start  

> httptoolkit-ui@0.1.0 start
> node-dev ./node_modules/httptoolkit-server/bin/run start & npm run start:web

> httptoolkit-ui@0.1.0 start:web
> env-cmd -f ./automation/ts-node.env webpack-dev-server --config ./automation/webpack.dev.ts

(node:81713) [DEP0125] DeprecationWarning: The _stream_wrap module is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Config checked in 9 ms
Certificates setup in 3 ms
Standalone server started in 6 ms
Server started in 12 ms
Total startup took 30 ms
ℹ 「wds」: Project is running at http://local.httptoolkit.tech:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/dist
ℹ 「wds」: 404s will fallback to /index.html
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at /home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
    at /home/quantum/Desktop/projects/httptoolkit/httptoolkit-ui/node_modules/graceful-fs/graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)

I guess it is some OpenSSL issue. I do have a workaround like setting env variable but it might be better if we fix it?

export NODE_OPTIONS=--openssl-legacy-provider
pimterry commented 2 years ago

Yes, this is probably because webpack v4 is using an older algorithm to calculate hashes, which is no longer supported. If you've got some time to look at upgrading to Webpack v5 that would be great! Many of the audit warnings come from webpack dependencies too, so upgrading should clean up lots of that along the way.

shirshak55 commented 2 years ago

I see thanks :) Closing it as it is supposed to be fixed on next upgrade.

blueputty01 commented 1 year ago

@pimterry Looking into upgrading v4 to v5, but google-fonts-plugin only works on v4. Any preference for a replacement? google-fonts-webpack-plugin seems to be a decent replacement.

pimterry commented 1 year ago

Hi @blueputty01, no, no preference at all - that module looks great. Thanks for looking into this!