Crypto module breaking

I’m trying to create a credential and getting the following error. Just started seeing this today…any ideas?

{
	"code": 0,
	"message": "Native crypto module could not be used to get secure random number.",
	"stack": "Error: Native crypto module could not be used to get secure random number.\n    at secureRandom (/Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/node_modules/crypto-js/core.js:45:16)\n    at Object.random (/Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/node_modules/crypto-js/core.js:337:30)\n    at Object.execute (/Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/node_modules/crypto-js/cipher-core.js:786:35)\n    at Object.encrypt (/Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/node_modules/crypto-js/cipher-core.js:837:42)\n    at Object.encrypt (/Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/node_modules/crypto-js/cipher-core.js:201:59)\n    at Credentials.setData (/Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/node_modules/n8n-core/dist/src/Credentials.js:20:37)\n    at /Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/dist/src/Server.js:379:25\n    at async /Users/tjenkins/.npm/_npx/72525/lib/node_modules/n8n/dist/src/ResponseHelper.js:72:26"
}

That problem got caused by the new version of the crypto-js module. Got already fixed. If you pull the latest code you will get the fix. Here is the commit:


And the issue on Github:

Great thank you for help!

1 Like

New version [email protected] just got released so npx install also works fine again.