You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After countless attempts to install on Ubuntu 16.04 LTS via NPM, when I run the CLI command javascript-obfuscator it says command not found. Other commands work fine, such as jsuglify.
Turns out your documentation has a mistake, the CLI commands for this module need to be run as sudo npm javascript-obfuscator (otherwise command is not found)
Maybe this should be noted, if someone is having a problem.
"structure your package.json such that any top-level modules that are also dependencies of other modules are listed lower down." - http://stackoverflow.com/a/20765400
I tried manually installing the modules and then re-installing javascript-obfuscator but it never works, I will have a look at the package.json and might make a pull request.
Thanks for the update, will keep updated on the development of this project. Also, as of 0.6.2 all the dependency issues are resolved. Just waiting on CLI in 0.7.0 as it's a part of my servers build process (was planned) will temporarily skip the command for now.
Thank you, unfortunately, I don't use web pack to build .js files as my deployment setup uses proprietary code and special loaders. Unless there is a way to use a CLI command to say perform the following?
Hmm, that didn't do it, but I can run it like so ./node_modules/.bin/javascript-obfuscator.
However, I get an error when I give it a .js file: ..node_modules/esprima/dist/esprima.js:3396
var error = new Error(msg);
^
Error: Line 29: Unexpected token
I guess that's outside the scope of this thread though.
Oooh, yes, so I'm trying to run this over React files. I guess that won't fly?
It's not liking things like: "import React from 'react';" "export default Constants;"
Activity
QuantumRevenger commentedon Jul 27, 2016
Turns out your documentation has a mistake, the CLI commands for this module need to be run as sudo npm javascript-obfuscator (otherwise command is not found)
Maybe this should be noted, if someone is having a problem.
QuantumRevenger commentedon Jul 27, 2016
Nope, still broken.
Just ran another module via CLI without a single issue, definitely this that is broken.
QuantumRevenger commentedon Jul 27, 2016
I have traced the problem to a dependency error.
"structure your package.json such that any top-level modules that are also dependencies of other modules are listed lower down." - http://stackoverflow.com/a/20765400
└─┬ [email protected]
├── UNMET PEER DEPENDENCY babel-core@^6.0.0
└── UNMET PEER DEPENDENCY webpack@1 || ^2.1.0-beta
I tried manually installing the modules and then re-installing javascript-obfuscator but it never works, I will have a look at the package.json and might make a pull request.
sanex3339 commentedon Jul 27, 2016
readme on master branch is for 0.7.0 version which is under development.
CLI - 0.7.0 feature and not available in 0.6.1 version.
sanex3339 commentedon Jul 27, 2016
anyway, 0.7.0 version coming soon
sanex3339 commentedon Jul 27, 2016
i updated npm package to 0.6.2 version
QuantumRevenger commentedon Jul 27, 2016
Thanks for the update, will keep updated on the development of this project. Also, as of 0.6.2 all the dependency issues are resolved. Just waiting on CLI in 0.7.0 as it's a part of my servers build process (was planned) will temporarily skip the command for now.
sanex3339 commentedon Jul 27, 2016
if you use webpack, you can use plugin for it
https://github.com/sanex3339/webpack-obfuscator
QuantumRevenger commentedon Jul 27, 2016
Thank you, unfortunately, I don't use web pack to build .js files as my deployment setup uses proprietary code and special loaders. Unless there is a way to use a CLI command to say perform the following?
obfuscate input.js output.js --parameter --parameter
sanex3339 commentedon Jul 27, 2016
before 0.7.0 there no way
QuantumRevenger commentedon Jul 27, 2016
Okay, I'll have to just wait a little longer for the update. Do you have any idea roughly when it might be ready?
(not an eta, just a guideline; very soon - less than a week, soon - next two weeks, near future - within a month, or distant future - over a month)
sanex3339 commentedon Jul 28, 2016
i need to wait while https://github.com/pleerock/class-validator package will update to stable version, because right now it throws error during installation
sanex3339 commentedon Jul 29, 2016
Dev version right now was published.
You can install it with following command:
QuantumRevenger commentedon Jul 31, 2016
This is great news, thank you for the update. I will deploy this on my build server on Monday.
lbayeva commentedon Dec 7, 2017
I seem to be having the same issue now. Trying to run a client, but get 'command not found'. Was this issue fixed?
sanex3339 commentedon Dec 7, 2017
Try
npm linklbayeva commentedon Dec 7, 2017
Hmm, that didn't do it, but I can run it like so ./node_modules/.bin/javascript-obfuscator.
However, I get an error when I give it a .js file: ..node_modules/esprima/dist/esprima.js:3396
var error = new Error(msg);
^
Error: Line 29: Unexpected token
I guess that's outside the scope of this thread though.
sanex3339 commentedon Dec 7, 2017
Error: Line 29: Unexpected tokenvalidate your JS code, looks like it invalid, or using es2018 features that are not supported byesprimalbayeva commentedon Dec 7, 2017
Oooh, yes, so I'm trying to run this over React files. I guess that won't fly?
It's not liking things like: "import React from 'react';" "export default Constants;"
sanex3339 commentedon Dec 7, 2017
It should support it
http://esprima.org/demo/parse.html
Try to paste full code of the file on this page. Will it parsing without any error?
sanex3339 commentedon Dec 7, 2017
JSX wont supported by
javascript-obfuscator. Run obfuscator over bundle.lbayeva commentedon Dec 7, 2017
Yeah, it's not liking JSX, will try running it over bundle. Thanks!
haitham7 commentedon Apr 13, 2018
hello @sanex3339, I have the same issue why?
when I tried to type this
$ javascript-obfuscator card-edit.js --compact true --self-defending false
return to me
bash: javascript-obfuscator: command not found
sanex3339 commentedon Apr 13, 2018
Hi. Try
npm linkornpm link javascript-obfuscatoror install it globally (if you want to use it as CLI) withnpm i -g javascript-obfuscatorlock commentedon Jun 6, 2018
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.