We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing initializer in const declaration error when creating minified build
const networkInterface,length;
Solution: Replace
if(typeof __webpack_require__ !== 'function'){ var mac = '', networkInterfaces = require('os').networkInterfaces(); for(interface_key in networkInterfaces){ var networkInterface = networkInterfaces[interface_key]; var length = networkInterface.length; for(var i = 0; i < length; i++){ if(networkInterface[i].mac && networkInterface[i].mac != '00:00:00:00:00:00'){ mac = networkInterface[i].mac; break; } } } address = mac ? parseInt(mac.replace(/\:|\D+/gi, '')).toString(36) : '' ; }
const networkInterface -> var networkInterface const length -> var length
The text was updated successfully, but these errors were encountered:
When running a unit test in Jest that uses uniqid the same problem appears:
Test suite failed to run ReferenceError: interface_key is not defined > 6 | const uniqid = require('uniqid');
Sorry, something went wrong.
I encounter this error when I run test in Jest also, is there any solution yet regarding this issue?
@mohit-jasapara , does your solution need to be applied on the minified bundle or on uniqid source code before minified?
No branches or pull requests
Missing initializer in const declaration error when creating minified build
const networkInterface,length;
Solution:
Replace
const networkInterface -> var networkInterface
const length -> var length
The text was updated successfully, but these errors were encountered: