When attempting to run yarn http-serve this project as described in the README, on a Mac, I encountered...
$ http-server-spa dist index.html 8080
[ERR] Could not start server, fallback file not found
[TRY] http-server-spa <directory> <fallback> <port>
✨ Done in 0.34s.
yarn build resulted in
yarn run v1.22.19
$ rm -fr dist && webpack -c webpack.prod.js
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:135:10)
at BulkUpdateDecorator.hashFactory (/Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/lib/util/createHash.js:138:18)
at BulkUpdateDecorator.update (/Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/lib/util/createHash.js:44:50)
at RawSource.updateHash (/Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/node_modules/webpack-sources/lib/RawSource.js:64:8)
at NormalModule._initBuildHash (/Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/lib/NormalModule.js:752:17)
at handleParseResult (/Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/lib/NormalModule.js:816:10)
at /Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/lib/NormalModule.js:907:4
at processResult (/Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/lib/NormalModule.js:639:11)
at /Users/russellzarse/dev/tools/json-schema-viewer/node_modules/webpack/lib/NormalModule.js:691:5
^C
A quick search yielded This SO Post indicating this is a known issue web pack issue in NodeJS 17.
I use nodenv to manage NodeJS versioning. The following resolved the original issue.
nodenv install 16.15.1
nodenv local 16.15.1
Really great work btw, and thanks very much for open sourcing it.
When attempting to run
yarn http-servethis project as described in the README, on a Mac, I encountered...yarn buildresulted inA quick search yielded This SO Post indicating this is a known issue web pack issue in NodeJS 17.
I use
nodenvto manage NodeJS versioning. The following resolved the original issue.nodenv install 16.15.1 nodenv local 16.15.1Really great work btw, and thanks very much for open sourcing it.