CodeYourFuture / CodeYourFuture/Project-js-slideshow

Not working on Ubuntu 22.04?

Open
#24 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
HTML
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This repo seems to be broken Ubuntu 22.04 LTS which is the version we recommend to trainees. From what I can tell the below error is related to Ubuntu's OpenSSL libraries being too old. It works on my Fedora 37 host (and quite possibly works on Mac though I can't test this). This is with node v18.13.0 and npm v9.3.1. The same issue occurs both in an Ubuntu 22.04 VM and in a Docker container.

```
$ npm run start

Starting the development server...

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:471:10)
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:503:5
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:358:12
at /workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/workspaces/cyf-slideshow-project/node_modules/react-scripts/scripts/start.js:19
throw err;
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:417:16)
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:452:10
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:323:13
at /workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /workspaces/cyf-slideshow-project/node_modules/babel-loader/lib/index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.13.0
```

A browser window opens on localhost:3000 but it's blank. There's no output in the browser dev console.

```
$ npm run build

> cyf-slideshow-project@0.1.0 build
> react-scripts build

Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:471:10)
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:503:5
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:358:12
at /workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/workspaces/cyf-slideshow-project/node_modules/react-scripts/scripts/build.js:19
throw err;
^

Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:133:10)
at module.exports (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:417:16)
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:452:10
at /workspaces/cyf-slideshow-project/node_modules/webpack/lib/NormalModule.js:323:13
at /workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/workspaces/cyf-slideshow-project/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /workspaces/cyf-slideshow-project/node_modules/babel-loader/lib/index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.13.0
```

For completeness, on the host machine (Fedora 37, homebrew node v19.4.0, npm v9.3.1):

$ npm install

npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated eslint-loader@3.0.3: This loader has been deprecated. Please use eslint-webpack-plugin
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated html-webpack-plugin@4.0.0-beta.11: please switch to a stable version
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated @types/testing-library__dom@7.5.0: This is a stub types definition. testing-library__dom provides its own type definitions, so you do not need this installed.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1880 packages, and audited 1881 packages in 47s

126 packages are looking for funding
run `npm fund` for details

49 vulnerabilities (19 moderate, 26 high, 4 critical)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run `npm audit` for details.

$ npm run start

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.