Last active
March 1, 2017 09:05
-
-
Save EddyVerbruggen/e57dac11e272cad5c3fccd0df6b9aa3b to your computer and use it in GitHub Desktop.
Require node-uuid without nativescript-nodeify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adding this line to your app... | |
var uuid = require('node-uuid'); | |
console.log("uuid.v1: " + uuid.v1()); | |
// ... leads to a crash (triggered by that first line) and this error being logged: | |
// error: file:///app/tns_modules/node-uuid/./uuid.js:121:24: JS ERROR TypeError: _rng is not a function. (In '_rng()', '_rng' is undefined) | |
// ... which is caused by these lines in uuid.js: | |
var _rb = require('crypto').randomBytes; | |
_rng = _rb && function() {return _rb(16);}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment