You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you move the upash.install inside the handler, the code will run up until it hits the upash.install line then the function errors (with a blank error message) at that point. So this is some kind of hard/can't-handle crash on that line when running in lambda functions
With the upash.installl line above/outside the function (like the code shows) you get a 'path' error...
Request from ::1: POST /gen-hash
Response with status 500 in 4 ms.
Error during invocation: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
at assertPath (path.js:39:11)
at dirname (path.js:714:5)
at Function.r.getRoot (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:10807)
at r (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:10003)
at Object.117 (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:7659)
at t (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:220)
at Object.116 (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:3959)
at t (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:220)
at Object.135 (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:19423)
at t (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:220)
at C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:1019
at Object. (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:1030)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
The text was updated successfully, but these errors were encountered:
I've looked through the install function and cant see a reason that it wouldnt work in a serverless environment. I can't seem to see the reference to upash in the stack trace? Do you have @phc/argon2 in your node_modules? I'm not to sure how lambda works with dependancies but it seems to have a problem loading a module.
I can't seem to get the simple example to work in AWS lambda function. Appears to error on the upash.install line. Here is my function...
If you move the upash.install inside the handler, the code will run up until it hits the upash.install line then the function errors (with a blank error message) at that point. So this is some kind of hard/can't-handle crash on that line when running in lambda functions
With the upash.installl line above/outside the function (like the code shows) you get a 'path' error...
Request from ::1: POST /gen-hash
Response with status 500 in 4 ms.
Error during invocation: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
at assertPath (path.js:39:11)
at dirname (path.js:714:5)
at Function.r.getRoot (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:10807)
at r (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:10003)
at Object.117 (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:7659)
at t (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:220)
at Object.116 (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:3959)
at t (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:220)
at Object.135 (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:19423)
at t (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:220)
at C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:1019
at Object. (C:\Users\markd\Documents\code-projects\web\netlify\easy-message-bus-netlify-restapi\lambda\gen-hash.js:1:1030)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
The text was updated successfully, but these errors were encountered: