TypeError: [].values is not a function
See original GitHub issueWhen running script via NPM the error TypeError: [].values is not a function is thrown, preventing the obfuscation
Expected Behavior
For the code to be obfuscated and the error to not be thrown or give context as to why it was thrown
Current Behavior
Error is thrown with no explanation why
Steps to Reproduce
Code string is passed to server and processed then returned. Processing always fails. Code string has no obvious issues. `try{ var obfuscationResult = JavaScriptObfuscator.obfuscate( objs.code, { compact: true, simplify: true, stringArray: false,
}
);
responseBody = {
status:"success",
result:obfuscationResult.getObfuscatedCode()
};
} catch(e){
responseBody = {
status:"error",
result:"Could not obsfuctae the given string\n\n"+e.toString()
};
}`
Your Environment
package json
{ "name": "jsobs", "version": "1.0.0", "description": "jsob for packager", "main": "index.js", "dependencies": { "clean-css": "^4.2.4", "css-minifiers": "^3.0.0", "css-minify": "^1.1.0", "html-minifier": "^3.5.21", "http": "0.0.0", "javascript-obfuscator": "^3.2.2" }, "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Thanks both, it looks like it was down to an older version of node being used. The script executes fine now using v16.13.2
Node version installed on this machine is v10.6.0. I will try updating it and see what happens