MDEGroup / jjodel

5 stars 0 forks source link

Error while trying to run the platform locally #6

Open agarciadom opened 3 weeks ago

agarciadom commented 3 weeks ago

While trying to run the platform locally today, I ran into this error message while trying to run the platform from my Apple Silicon Mac:

$ docker run --rm -v .:/home/node/app -w /home/node/app -p 8080:8080 node:22 npm run start

> jjodel@0.1.0 start
> react-app-rewired start

[HPM] Proxy created: /  -> http://localhost:8080
[HPM] Proxy created: /  -> http://localhost:5002
[HPM] Proxy created: /  -> ws://localhost:5001
ℹ 「wds」: Project is running at http://172.17.0.2/
ℹ 「wds」: webpack output is served from 
ℹ 「wds」: Content not from webpack is served from /home/node/app/public
ℹ 「wds」: 404s will fallback to /
Starting the development server...

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
/home/node/app/node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

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

Node.js v22.8.0
npm notice
npm notice New patch version of npm available! 10.8.2 -> 10.8.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.3
npm notice To update run: npm install -g npm@10.8.3
npm notice

You can try to reproduce this issue with these commands, from a clean clone:

docker run --rm -v .:/home/node/app -w /home/node/app node:22 npm install
docker run --rm -v .:/home/node/app -w /home/node/app -p 8080:8080 node:22 npm run start

I have also tried to run this locally, by installing Node directly, using the same basic npm install and npm run start commands, and I end up with the same error message.

joeriexelmans commented 3 days ago

I have the same problem when running npm start with NodeJS 22. The log of npm install hints at deprecated dependencies that break on NodeJS 14+:

[nix-shell:~/repos/jjodel]$ npm i
npm warn skipping integrity check for git dependency ssh://git@github.com/ariya/esprima.git
npm warn deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm warn deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm warn deprecated @hapi/bourne@1.3.2: 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 sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm warn deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm warn deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less 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 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 rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
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 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 @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
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 core-js@2.6.12: core-js@<3.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. Please, upgrade your dependencies to the actual version of core-js.

added 2234 packages, and audited 2235 packages in 7s

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

147 vulnerabilities (4 low, 104 moderate, 31 high, 8 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.