MDEGroup / jjodel

5 stars 0 forks source link

Error while trying to run the platform locally #6

Open agarciadom opened 2 months ago

agarciadom commented 2 months 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 1 month 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.
jdirocco commented 4 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

Hi Antonio,

Perfect. Happy to hear that. If you need any details and tutorials on how to model in jjodel, we are more than happy to help you. You are right; the port is incorrect. We are restructuring the repository and updating the deployment guide.

You can access jjodel in offline mode (the link is below the login page), which does not require any registration. In offline mode, you cannot use the collaborative features, and all data are stored in the client’s local storage.

I’m wondering if we can integrate the EPSILON playground into jjodel (at least to support model transformation). Internally, jjodel has its representation as well as JOL, an operational language (a kind of EOL). However, jjodel models (and metamodels) are compatible with the EMF format, and we can export models (and metamodels) in standard XMI. I suppose the ESPILON playground web tool has REST APIs behind it. Do you have any guidelines or examples to check the feasibility? What do you think? Additionally, the EPSILON playground includes a web-based editor for different EPSILON languages. Can we integrate them into jjodel?

We are open to any collaborations, and your suggestions are welcome. Cheers, Juri

Da: Antonio García-Domínguez @.> Data: mercoledì, 6 novembre 2024 alle ore 20:34 A: MDEGroup/jjodel @.> Cc: Juri Di Rocco @.>, Comment @.> Oggetto: Re: [MDEGroup/jjodel] Error while trying to run the platform locally (Issue #6)

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?

— Reply to this email directly, view it on GitHubhttps://github.com/MDEGroup/jjodel/issues/6#issuecomment-2460611862, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABXTOHPQWAC6I5CNCXRU443Z7JVLNAVCNFSM6AAAAABOUKDLL2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRQGYYTCOBWGI. You are receiving this because you commented.Message ID: @.***>