on master help sign in
Add instructions for Node.js 17 incompatibility (#1308)

[Node.js v17 comes with webpack 4 which has some incompatibilities in cryptography suites](https://stackoverflow.com/questions/69665222/node-js-17-0-1-gatsby-error-digital-envelope-routinesunsupported-err-os). Installing and running urbit.org can still be accomplished using Node.js v17+ using the added commands, at least until the project is upgraded to webpack 5. This is my limited understanding based on my limited experience w/ JavaScript and some searching of stackoverflow. If I am mistaken, my apologies for this commit - this did, however, work for me to build locally without changing node versions.

commit7e02162d6ac51bd71b0e72249ff6a3cb6e386c7d authorrabsef-bicrym <52549148+rabsef-bicrym@users.noreply.github.com> dateMon 28 Mar 2022, 12:23 (5 years ago) parentc7dd4a5
1 file changed+33
README.md+33
README.md+33
@@ -16,6 +16,39 @@ yarn dev
1616
1717Finally, open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
1818
19+### Errors with Digital Envelope Routines
20+
21+Gatsby v4 is not compatible with Webpack v4. If you're building with Node.js v17 or greater, you may experience some issues when building [urbit.org](https://urbit.org). The incompatibility between Gatsby and Webpack will present as the following error message on `yarn dev` or `npm run dev`:
22+
23+```bash
24+Error: error:0308010C:digital envelope routines::unsupported
25+ at new Hash (node:internal/crypto/hash:67:19)
26+ at Object.createHash (node:crypto:130:10)
27+ at module.exports.__webpack_modules__.15660.module.exports (~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:111680:62)
28+ at NormalModule._initBuildHash (~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:85092:16)
29+ at handleParseError (~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:85146:10)
30+ at ~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:85178:5
31+ at ~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:85033:12
32+ at ~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:51096:3
33+ at iterateNormalLoaders (~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:50937:10)
34+ at Array.<anonymous> (~/urbit.org/node_modules/next/dist/compiled/webpack/bundle4.js:50928:4) {
35+ opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
36+ library: 'digital envelope routines',
37+ reason: 'unsupported',
38+ code: 'ERR_OSSL_EVP_UNSUPPORTED'
39+}
40+```
41+
42+To work around this error, you can take the following steps:
43+
44+```bash
45+npm install gatsby
46+# then
47+export NODE_OPTIONS=--openssl-legacy-provider
48+```
49+
50+Adding the `openssl-legacy-provider` option should allow you to build the site successfully.
51+
1952## Framework and Library Documentation
2053
2154To learn more about Next.js, take a look at the following resources: