Latest argon2 doesn’t work on arm

OS info

  • Operating System : Mac OSX 23.5.0
  • Wappler Version : 6.7.0

Problem description

....=> ERROR [web 9/9] RUN npm install --no-optional --no-package-lock 11.3s

[web 9/9] RUN npm install --no-optional --no-package-lock:
0.156 npm warn config optional Use --omit=optional to exclude optional dependencies, or
0.156 npm warn config --include=optional to include them.
0.156 npm warn config
0.156 npm warn config Default value does install optional deps unless otherwise omitted.
11.22 npm notice
11.22 npm notice New minor version of npm available! 10.7.0 -> 10.8.1
11.22 npm notice Changelog: Release v10.8.1 · npm/cli · GitHub
11.22 npm notice To update run: npm install -g npm@10.8.1
11.22 npm notice
11.22 npm error code 1
11.22 npm error path /opt/node_app/node_modules/argon2
11.22 npm error command failed
11.22 npm error command sh -c node-gyp-build
11.22 npm error gyp info it worked if it ends with ok
11.22 npm error gyp info using node-gyp@10.1.0
11.22 npm error gyp info using node@18.20.3 | linux | arm64
11.22 npm error gyp ERR! find Python
11.22 npm error gyp ERR! find Python Python is not set from command line or npm configuration
11.22 npm error gyp ERR! find Python Python is not set from environment variable PYTHON
11.22 npm error gyp ERR! find Python checking if "python3" can be used
11.22 npm error gyp ERR! find Python - executable path is ""
11.22 npm error gyp ERR! find Python - "" could not be run
11.22 npm error gyp ERR! find Python checking if "python" can be used
11.22 npm error gyp ERR! find Python - executable path is ""
11.22 npm error gyp ERR! find Python - "" could not be run
11.22 npm error gyp ERR! find Python
11.22 npm error gyp ERR! find Python **********************************************************
11.22 npm error gyp ERR! find Python You need to install the latest version of Python.
11.22 npm error gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
11.22 npm error gyp ERR! find Python you can try one of the following options:
11.22 npm error gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
11.22 npm error gyp ERR! find Python (accepted by both node-gyp and npm)
11.22 npm error gyp ERR! find Python - Set the environment variable PYTHON
11.22 npm error gyp ERR! find Python - Set the npm configuration variable python:
11.22 npm error gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
11.22 npm error gyp ERR! find Python For more information consult the documentation at:
11.22 npm error gyp ERR! find Python GitHub - nodejs/node-gyp: Node.js native addon build tool
11.22 npm error gyp ERR! find Python **********************************************************
11.22 npm error gyp ERR! find Python
11.22 npm error gyp ERR! configure error
11.22 npm error gyp ERR! stack Error: Could not find any Python installation to use
11.22 npm error gyp ERR! stack at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:306:11)
11.22 npm error gyp ERR! stack at PythonFinder.findPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:164:17)
11.22 npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
11.22 npm error gyp ERR! stack at async configure (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:27:18)
11.22 npm error gyp ERR! stack at async run (/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:81:18)
11.22 npm error gyp ERR! System Linux 6.6.26-linuxkit
11.22 npm error gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
11.22 npm error gyp ERR! cwd /opt/node_app/node_modules/argon2
11.22 npm error gyp ERR! node -v v18.20.3
11.22 npm error gyp ERR! node-gyp -v v10.1.0
11.22 npm error gyp ERR! not ok
11.22
11.22 npm error A complete log of this run can be found in: /root/.npm/_logs/2024-06-12T16_53_36_538Z-debug-0.log


failed to solve: process "/bin/sh -c npm install --no-optional --no-package-lock" did not complete successfully: exit code: 1
Error Launching Services!

Steps to reproduce

  1. Install 6.7
  2. Force Update App Connect and Components - Select All
  3. Force Update Serve Connect Framework - Select All

Is this on local docker or remote server?

If remote what is the server OS and architecture?

I can confirm, I get the same error in version 6.7.0 in local docker server. Publishes and launches servers in the remote target without any issues.
Worked well in previous version
OS: MacOS14.5 (23F79)

---UPDATE

Launching project form 5.8.2 works fine, without deployment error.
Would anyone have version 6.6 by any chance? :grinning:

broke my prod deployment, it just spins on this step forever (more than 5 minutes I just closed my wappler) to reinstall using V5

NoseJs / Docker -> Digital Ocean

[web 9/9] RUN npm install --no-optional --no-package-lock:

What do you see when you run the System Check?

Local system check? :slight_smile:

Checking Docker Desktop installation and version...
Docker version 23.0.5, build bc4487a
Docker Desktop is correctly installed.
Check completed successfully...

Hello, something like this happened to me when the package.json had a custom modification such as new dependencies from github or others.
Can you verify your package.json file?

I'm on MacOS 14.4.1.

Dev = local Docker, Node, DO server & managed database
Prod = same but remote docker

Can confirm the same - dev target won't work. I'm getting the same error.
Have tried install/update of both python and node locally.

Prod seems to be deploying ok.

{
  "name": "dr_rita_arand",
  "version": "2.0.0",
  "private": true,
  "description": "",
  "main": "index.js",
  "engines": {
    "node": ">=16.9.0"
  },
  "scripts": {
    "start": "node ./index.js"
  },
  "author": "Wappler",
  "license": "ISC",
  "dependencies": {
    "@aws-sdk/client-s3": "^3.41.0",
    "@aws-sdk/s3-request-presigner": "^3.41.0",
    "@cdmx/wappler_ag_grid": "^1.7.2",
    "@socket.io/redis-adapter": "^8.2.1",
    "archiver": "^7.0.1",
    "argon2": "^0.40.3",
    "compression": "^1.7.4",
    "connect-redis": "^7.1.0",
    "connect-session-knex": "^4.0.0",
    "cookie-parser": "^1.4.6",
    "cors": "^2.8.5",
    "debug": "^4.3.2",
    "dotenv": "^16.0.3",
    "ejs": "^3.1.6",
    "express": "^4.17.1",
    "express-end": "0.0.8",
    "express-fileupload": "^1.2.1",
    "express-session": "^1.17.2",
    "follow-redirects": "^1.14.5",
    "fs-extra": "^11.2.0",
    "http-proxy": "^1.18.1",
    "knex": "^3.0.1",
    "mime-types": "^2.1.34",
    "node-schedule": "^2.0.0",
    "nodemailer": "^6.7.1",
    "nodemon": "^3.0.1",
    "pg": "^8.7.1",
    "qs": "^6.10.1",
    "redis": "^4.6.6",
    "session-file-store": "^1.5.0",
    "sharp": "^0.32.6",
    "socket.io": "^4.6.1",
    "unzipper": "^0.12.1",
    "uuid": "^10.0.0"
  },
  "nodemonConfig": {
    "watch": [
      "app",
      "lib",
      "views",
      "extensions",
      "tmp/**/restart.txt"
    ],
    "ext": "ejs,js,json"
  }
}

I'd start with updating Docker and Docker Desktop. 23.0.5 is an older version and there have been many changes made with the latest version being 26.0.2. Including some quite fundemental changes.

Local docker

I'm on 26.1.1, getting the same error...

1 Like

Its good practice to stay on top of updates it is one less thing to debug or cause a conflict.

Seems to be a Mac only issue?

Seems like the newest version of the argon2 package is giving you some trouble, specifically on arm processors.

You might try to lower it to the previous 0.31.2 in your package.json

See for the versions:

1 Like

You will need to update your Dockerfile in order to install Python and other dependencies required for node-gyp to make work argon2 in that version 40

RUN apt-get update && apt-get install -y python3 make g++ \
  && ln -s /usr/bin/python3 /usr/bin/python

The default version installed normally is:
"argon2": "^0.31.1",

Updating Docker did not solve the problem on my MAC. Are we sure it a mac only problem?

I run mac and windows on split screen using a share keyboard/mouse setup. I'm waiting to update my windows so i use it in the mean time.

Fab - thanks!
I switched it back to the older version in package.json and it has done the trick :+1:

Don't mind asking, but my changes are overwritten every time I launch Wappler, how do you make the changes persist in package.json? :slight_smile:

I guess at least I can deploy and work before relaunching Wappler :slight_smile:

Can confirm updating parkage.json works and that it reverts on relaunch

Change manually the version of the package to: ^0.31.1 or ^0.31.2, then on terminal tab write npm update.
Or write in terminal directly: npm i argon2@0.31.2

1 Like