Status: "500", code: "MODULE_NOT_FOUND"

Hello,

I updated to Wappler current version and now have problems with login:

{status: "500", code: "MODULE_NOT_FOUND",…} code: "MODULE_NOT_FOUND" message: "Cannot find module 'argon2'\nRequire stack:\n- /opt/node_app/lib/auth/database.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js" stack: "Error: Cannot find module 'argon2'\nRequire stack:\n- /opt/node_app/lib/auth/database.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js\n at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n at Module.require (internal/modules/cjs/loader.js:887:19)\n at require (internal/modules/cjs/helpers.js:74:18)\n at DatabaseProvider.validate (/opt/node_app/lib/auth/database.js:24:36)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)\n at async DatabaseProvider.login (/opt/node_app/lib/auth/provider.js:45:26)\n at async App._exec (/opt/node_app/lib/core/app.js:463:30)\n at async App._exec (/opt/node_app/lib/core/app.js:434:17)\n at async App.exec (/opt/node_app/lib/core/app.js:403:9)" status: "500"

What happened?
I deleted the lib folder and saved one action to regenerate and deployed again, the problem persists.

I’m using Node.js + postgres + docker
Thanks!

How is your security provider set up and what hashing method are you using?

Unless you are using Argon2 password hashing, untick the box in Security Provider:

If you are using it:

Thanks @teodor and @bpj!

Found some posts here, and solved:

  1. Added argon to package.json
  2. Updated node packges
  3. Uncheck the hash verify on security provider.

I updated Wappler, and deployed a new version of my app in production and started to receive complains from the users, they could not login into the app. Is there a way to new updates doesn’t break so important things? I had problems with upload files before and now with login :frowning:

I really love Wappler and Wappler team, you are geniuses, but we have business running and this kind of problem is very bad to companie’s reputation.

It’s pretty rare and only because Argon wasn’t an option for NodeJS until recently so the tick box had no effect - some people had therefore ticked it even when it wasn’t needed.

They have added the project file update list recently to allow you to control which files are updated in your projects so that gives you control over changes.

As you’ll see from many conversations in the community. Git is your friend - allowing you to revert back to previous versions of your app easily in the even of something breaking. Wappler makes the management of versions in Git so easy!
https://docsdev.wappler.io/guides/version-control-with-git

1 Like