Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to run the platform locally #6

Open
agarciadom opened this issue Sep 22, 2024 · 4 comments
Open

Error while trying to run the platform locally #6

agarciadom opened this issue Sep 22, 2024 · 4 comments
Assignees

Comments

@agarciadom
Copy link

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

> [email protected] 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 [email protected]
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
Copy link

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://[email protected]/ariya/esprima.git
npm warn deprecated [email protected]: flatten is deprecated in favor of utility frameworks such as lodash.
npm warn deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm warn deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm warn deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm warn deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm warn deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm warn deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated [email protected]: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm warn deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm warn deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm warn deprecated [email protected]: 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 [email protected]: 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/[email protected]: This version has been deprecated and is no longer supported or maintained
npm warn deprecated @hapi/[email protected]: Switch to 'npm install joi'
npm warn deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm warn deprecated [email protected]: 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.

@jdirocco
Copy link
Member

jdirocco commented Nov 5, 2024

Hi @agarciadom you can use the following docker-compose file.

version: '3.8'
services:
  mongo:
    image: mongo
    container_name: mongo
    ports:
      - 27017:27017
    volumes:
      - ./database/db:/data/db
      - ./database/dev.archive:/Databases/dev.archive
      - ./database/production:/Databases/production
    restart: always

  mongo-express:
    image: mongo-express
    container_name: mexpress
    environment:
      - ME_CONFIG_BASICAUTH_USERNAME=admin
      - ME_CONFIG_BASICAUTH_PASSWORD=admin
    links:
      - mongo
    ports:
      - 8081:8081
    restart: always

  collaborative:
    image: giordanotin/collaborative:1.2
    container_name: collaborative
    links:
      - mongo
    ports:
      - 5001:5001
    restart: always

  persistance:
    image: giordanotin/persistance:1.6
    container_name: persistance
    links:
      - mongo
    ports:
      - 5002:5002
    restart: always

  memorec:
    container_name: memorec
    image: giordanotin/memorec:1.8
    ports:
      - 8080:8080
    restart: always

  frontend:
    image: giordanotin/jjodel:latest
    container_name: frontend
    depends_on:
      - memorec
      - collaborative
      - persistance
    ports:
      - 80:80
    restart: always

Please let me know if it works.

@agarciadom
Copy link
Author

That worked, thank you! I had to go to http://localhost instead of http://localhost:3000 as in the README, though, and I also had to create my own account. Is that to be expected? Is there a default username/password that I could use without registering?

@jdirocco
Copy link
Member

jdirocco commented Nov 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants