Wappler Version : v5.3.2
Operating System : macOS Monterey 12.6
Server Model: node js
Database Type: postgresql
Hosting Type: docker
Expected behavior
What do you think should happen?
When I deploy my application that uses Argon2 hashing to a docker-machine (using Wappler) I would expect it to work.
Actual behavior
It appears that as part of the building and deploying the docker container, Wappler is missing the package include for Argon2.
Here’s the error message I am given:
server-connect:app Executing action step passwordHash +1ms
server-connect:app options: { password: ‘{{$_POST.admin_password}}’, algo: ‘argon2id’ } +1ms
server-connect:server Got error? Error: Cannot find module ‘argon2’
server-connect:server Require stack:
server-connect:server - /opt/node_app/lib/modules/crypto.js
server-connect:server - /opt/node_app/lib/core/app.js
server-connect:server - /opt/node_app/lib/core/middleware.js
server-connect:server - /opt/node_app/lib/setup/routes.js
server-connect:server - /opt/node_app/lib/server.js
server-connect:server - /opt/node_app/index.js
server-connect:server at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
server-connect:server at Function.Module._load (node:internal/modules/cjs/loader:841:27)
server-connect:server at Module.require (node:internal/modules/cjs/loader:1067:19)
server-connect:server at require (node:internal/modules/cjs/helpers:103:18)
server-connect:server at App.exports.passwordHash (/opt/node_app/lib/modules/crypto.js:8:18)
server-connect:server at App._exec (/opt/node_app/lib/core/app.js:584:57)
server-connect:server at App._exec (/opt/node_app/lib/core/app.js:551:28)
server-connect:server at App.exec (/opt/node_app/lib/core/app.js:520:20)
server-connect:server at App.condition (/opt/node_app/lib/modules/core.js:109:28)
server-connect:server at App._exec (/opt/node_app/lib/core/app.js:584:57) {
server-connect:server code: ‘MODULE_NOT_FOUND’,
server-connect:server requireStack: [
server-connect:server ‘/opt/node_app/lib/modules/crypto.js’,
server-connect:server ‘/opt/node_app/lib/core/app.js’,
server-connect:server ‘/opt/node_app/lib/core/middleware.js’,
server-connect:server ‘/opt/node_app/lib/setup/routes.js’,
server-connect:server ‘/opt/node_app/lib/server.js’,
server-connect:server ‘/opt/node_app/index.js’
server-connect:server ]
server-connect:server } +0ms
How to reproduce
Build an application that uses Argon2. Deploy it to a docker machine using Wappler. Watch the missing module error when you try to log in with Argon2 hashing.
I respect there might be a manual way of fixing this (by updating package.json), however I’ve not been able to find an example of how to do this.
Last updated: