Last active
March 1, 2017 09:09
-
-
Save EddyVerbruggen/28ae0759a806318af25e586255f3c6af to your computer and use it in GitHub Desktop.
Require node-uuid with 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()); | |
// ... no longer leads to a crash but this output instead: | |
// uuid.v1: f7c65940-fe57-11e6-a543-e5004118dcb5 | |
// ... which is because the plugin changed this line in uuid.js: | |
var _rb = require('crypto').randomBytes; | |
// ... to this: | |
var _rb = require('nativescript-nodeify/node_modules/crypto-browserify').randomBytes; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment