I imported node module 'request' in app.js but as soon as my script read,
var request = require('request');
it creates an error like below. Anyone has an idea?
Error Message:
[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()
request depends on the library node-uuid
. 'node-uuid' is used for generating random UUID's, also called GUID's.
To get truly random UUID's, node-uuid requires a cryptographically secure random source. Normally it will use crypto.randomBytes
(in node) or crypto.getRandomValues
(in the browser), but if that does not exist it will fall back to Math.Random. However, Math.random cannot generate cryptographically secure random numbers (read here for more info).
Request uses UUID's for its OAuth nonces and multipart file uploads. If you use OAuth, not having secure random nonces may be a security concern.
The crypto module should be present in all node installations (to my knowledge), so it's likely that you are running this code in a web browser environment. You may be running in a web browser that doesn't support the crypto module quite yet, and therefore Math.random is really your only option. You can check the can i use page to see if your browser supports getRandomValues
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With