Skip to content

NPM Module broken? #8

Closed
Closed

Description

@QuantumRevenger

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.

Any suggestions?

Activity

  1. QuantumRevenger commented on Jul 27, 2016

    @QuantumRevenger
    Author

    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.

  2. QuantumRevenger commented on Jul 27, 2016

    @QuantumRevenger
    Author

    Nope, still broken.

    Just ran another module via CLI without a single issue, definitely this that is broken.

  3. QuantumRevenger commented on Jul 27, 2016

    @QuantumRevenger
    Author

    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.

  4. sanex3339 commented on Jul 27, 2016

    @sanex3339
    Member

    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.

  5. sanex3339 commented on Jul 27, 2016

    @sanex3339
    Member

    anyway, 0.7.0 version coming soon

  6. sanex3339 commented on Jul 27, 2016

    @sanex3339
    Member

    i updated npm package to 0.6.2 version

  7. QuantumRevenger commented on Jul 27, 2016

    @QuantumRevenger
    Author

    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.

  8. sanex3339 commented on Jul 27, 2016

    @sanex3339
    Member

    if you use webpack, you can use plugin for it
    https://github.com/sanex3339/webpack-obfuscator

  9. QuantumRevenger commented on Jul 27, 2016

    @QuantumRevenger
    Author

    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

  10. sanex3339 commented on Jul 27, 2016

    @sanex3339
    Member

    before 0.7.0 there no way

  11. QuantumRevenger commented on Jul 27, 2016

    @QuantumRevenger
    Author

    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)

  12. sanex3339 commented on Jul 28, 2016

    @sanex3339
    Member

    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

  13. sanex3339 commented on Jul 29, 2016

    @sanex3339
    Member

    Dev version right now was published.
    You can install it with following command:

    npm install [email protected] --save
    
  14. QuantumRevenger commented on Jul 31, 2016

    @QuantumRevenger
    Author

    This is great news, thank you for the update. I will deploy this on my build server on Monday.

  15. lbayeva commented on Dec 7, 2017

    @lbayeva

    I seem to be having the same issue now. Trying to run a client, but get 'command not found'. Was this issue fixed?

  16. sanex3339 commented on Dec 7, 2017

    @sanex3339
    Member

    Try npm link

  17. lbayeva commented on Dec 7, 2017

    @lbayeva

    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.

  18. sanex3339 commented on Dec 7, 2017

    @sanex3339
    Member

    Error: Line 29: Unexpected token validate your JS code, looks like it invalid, or using es2018 features that are not supported by esprima

  19. lbayeva commented on Dec 7, 2017

    @lbayeva

    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;"

  20. sanex3339 commented on Dec 7, 2017

    @sanex3339
    Member

    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?

  21. sanex3339 commented on Dec 7, 2017

    @sanex3339
    Member

    JSX wont supported by javascript-obfuscator. Run obfuscator over bundle.

  22. lbayeva commented on Dec 7, 2017

    @lbayeva

    Yeah, it's not liking JSX, will try running it over bundle. Thanks!

  23. haitham7 commented on Apr 13, 2018

    @haitham7

    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

  24. sanex3339 commented on Apr 13, 2018

    @sanex3339
    Member

    Hi. Try npm link or npm link javascript-obfuscator or install it globally (if you want to use it as CLI) with npm i -g javascript-obfuscator

  25. lock commented on Jun 6, 2018

    @lock

    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.

  26. locked as resolved and limited conversation to collaborators on Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions