I am getting subject error while registering a simple Mean Application through http://localhost:3000/auth/register, that I have simply created using mean init
comma
Per the crypto.pbkdf2Sync
method you are missing the final argument which is digest
, thus the error being displayed.
crypto.pbkdf2
Also with further investigation you can see that the digest argument was required in Node v6.0.
The previous default seems to have been 'sha1'
.
This could also be caused by the wrong version of node / running a version that has calls that are not supported in the version of node that you have active
My Experience: My team has an application that requires Node 6.10.0. Sometimes I forget to switch to this version of node and run the latest code under 8.6.0 and I receive the same error. As soon as I swap back to 6.10.0 the website will allow me to login.
(I can see that the accepted answer also mentions this, but I wanted to add a more obvious answer in case it helps someone out there!)