I ran the code using command prompt and it reported: "string is not a function".
here is my code:
const uuid = require('uuid/v1');
const myaddress = uuid().split('-').join('');
console.log(myaddress)
Assuming you are using this package https://www.npmjs.com/package/uuid then you likely need to specify what part of the API (or version) you are wanting to use. So using version 4 would look something like this:
const { v4: uuidv4 } = require('uuid');
const myaddress = uuidv4().split('-').join('');
// output might look like "00207ec4afeb4e2ebed0fb9d9d0a5ef2"
https://npm.runkit.com/uuid is a simple online tool to test the code.