javascript-obfuscator / javascript-obfuscator-ui

A web UI to the JavaScript Obfuscator node.js package.
https://obfuscator.io
BSD 2-Clause "Simplified" License
230 stars 130 forks source link

Having trouble running the webui #3

Closed paul-dev8 closed 7 years ago

paul-dev8 commented 7 years ago

I installed the most recent node.js 7.2 and webpack 2.1.0 beta 27 and after I install the dependencies, I get the following error. Any idea what I need to do to fix it? Thanks! It's really great of you to open source this!

Webpack is watching the files…

Hash: 30c04c184e14f933f9c3 Version: webpack 2.1.0-beta.27 Time: 460ms Asset Size Chunks Chunk Names bundle.js 5.29 kB 0 [emitted] main

ERROR in ./App/index.js Module build failed: ReferenceError: [BABEL] c:\wamp64\nodejs\javascript-obfuscator-ui-master\App\index.js: Unknown option: c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\react\react.js.Children. Check out http://babeljs.io/docs/usage/options/ for more information about options.

A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:

Invalid: { presets: [{option: value}] } Valid: { presets: [['presetName', {option: value}]] }

For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options. (While processing preset: "c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\react\react.js") at Logger.error (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\logger.js:41:11) at OptionManager.mergeOptions (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:221:20) at c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:260:14 at c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:329:22 at Array.map (native) at OptionManager.resolvePresets (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:270:20) at OptionManager.mergePresets (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:259:10) at OptionManager.mergeOptions (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:244:14) at OptionManager.init (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\options\option-manager.js:374:12) at File.initOptions (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\index.js:216:65) at new File (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\file\index.js:139:24) at Pipeline.transform (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-core\lib\transformation\pipeline.js:46:16) at transpile (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-loader\lib\index.js:41:20) at Object.module.exports (c:\wamp64\nodejs\javascript-obfuscator-ui-master\node_modules\babel-loader\lib\index.js:138:12)

slig commented 7 years ago

Hi!

It's really nice to see someone else using this code!

I'm not sure what is the issue. I deleted my node_modules folder and installed everything again and it worked, so it's not an issue with a newer react version.

Can you try to delete yours node_modules folder, install yarn and run:

# run this instead of npm install
yarn

npm run updatesemantic
npm run webpack:dev

Thanks!

paul-dev8 commented 7 years ago

Thanks Tiago, I love your work by the way! I'm launching a new site and wanted to get this obfuscator working, but it's been giving me grief all day :)

On Tue, Nov 29, 2016 at 12:39 PM, Tiago Serafim notifications@github.com wrote:

Hi!

It's really nice to see someone else using this code!

I'm not sure what is the issue. I deleted my node_modules folder and installed everything again and it worked, so it's not an issue with a newer react version.

Can you try to delete yours node_modules folder, install yarn and run:

run this instead of npm install

yarn

npm run updatesemantic npm run webpack:dev

Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javascript-obfuscator/javascript-obfuscator-ui/issues/3#issuecomment-263641647, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWFmV3tRGyElAl2jNeE4ZJawTOuyrWks5rDGM2gaJpZM4K_P7I .

slig commented 7 years ago

You're welcome! Please let me know if using yarn solved your issue.

paul-dev8 commented 7 years ago

lol, it looks like one of the modules is incompatible with windows. I'll try on linux and let you know how it goes.

c:\wamp64\nodejs\javascript-obfuscator-ui-master>yarn yarn install v0.17.9 [1/4] Resolving packages... [2/4] Fetching packages... error fsevents@1.0.14: The platform "win32" is incompatible with this module. error Found incompatible module info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

On Tue, Nov 29, 2016 at 12:55 PM, Tiago Serafim notifications@github.com wrote:

You're welcome! Please let me know if using yarn solved your issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javascript-obfuscator/javascript-obfuscator-ui/issues/3#issuecomment-263646454, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWFok7L6r94EtbdfpMq9XkGg7s_pD3ks5rDGcfgaJpZM4K_P7I .

slig commented 7 years ago

fsevents isn't really necessary. You can comment it on packages.json.

Webpack is really slow on macOS without it, so I installed it, but I didn't know it wasn't compatible with Windows.

paul-dev8 commented 7 years ago

Looks like cp and rm needs to be changed in the script somewhere....

$ npm run updatesemantic

javascriptobfuscator@1.0.0 updatesemantic c:\wamp64\nodejs\javascript-obfuscator-ui-master cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/

'cp' is not recognized as an internal or external command, operable program or batch file.

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\wamp64\nodejs\node.exe" "C:\wamp64\nodejs\node_modules\npm\bin\npm-cli.js" "run" "updatesemantic" npm ERR! node v7.2.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! javascriptobfuscator@1.0.0 updatesemantic: cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/ npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the javascriptobfuscator@1.0.0 updatesemantic script 'cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the javascriptobfuscator package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/ npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs javascriptobfuscator npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls javascriptobfuscator npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! c:\wamp64\nodejs\javascript-obfuscator-ui-master\npm-debug.log error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

c:\wamp64\nodejs\javascript-obfuscator-ui-master>

On Tue, Nov 29, 2016 at 1:12 PM, Tiago Serafim notifications@github.com wrote:

fsevents isn't really necessary. You can comment it on packages.json.

Webpack is really slow on macOS without it, so I installed it, but I didn't know it wasn't compatible with Windows.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javascript-obfuscator/javascript-obfuscator-ui/issues/3#issuecomment-263651022, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWFtyh3PYdKhTUFXMiE_mVzuiwsSiEks5rDGsIgaJpZM4K_P7I .

paul-dev8 commented 7 years ago

Lol, windows gets no love...

On Tue, Nov 29, 2016 at 1:24 PM, Paul P paulnexus85@gmail.com wrote:

Looks like cp and rm needs to be changed in the script somewhere....

$ npm run updatesemantic

javascriptobfuscator@1.0.0 updatesemantic c:\wamp64\nodejs\javascript- obfuscator-ui-master cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/

'cp' is not recognized as an internal or external command, operable program or batch file.

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\wamp64\nodejs\node.exe" "C:\wamp64\nodejs\node_modules\npm\bin\npm-cli.js" "run" "updatesemantic" npm ERR! node v7.2.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! javascriptobfuscator@1.0.0 updatesemantic: cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/ npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the javascriptobfuscator@1.0.0 updatesemantic script 'cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the javascriptobfuscator package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/ npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs javascriptobfuscator npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls javascriptobfuscator npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! c:\wamp64\nodejs\javascript-obfuscator-ui-master\npm- debug.log error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

c:\wamp64\nodejs\javascript-obfuscator-ui-master>

On Tue, Nov 29, 2016 at 1:12 PM, Tiago Serafim notifications@github.com wrote:

fsevents isn't really necessary. You can comment it on packages.json.

Webpack is really slow on macOS without it, so I installed it, but I didn't know it wasn't compatible with Windows.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javascript-obfuscator/javascript-obfuscator-ui/issues/3#issuecomment-263651022, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWFtyh3PYdKhTUFXMiE_mVzuiwsSiEks5rDGsIgaJpZM4K_P7I .

paul-dev8 commented 7 years ago

Ok, got it to work in window... Had to manually do the copy to the node modules and then run the npm run webpack:dev.

How do I view the web interface, now that it's running? Is it running on a particular port?

On Tue, Nov 29, 2016 at 1:24 PM, Paul P paulnexus85@gmail.com wrote:

Lol, windows gets no love...

On Tue, Nov 29, 2016 at 1:24 PM, Paul P paulnexus85@gmail.com wrote:

Looks like cp and rm needs to be changed in the script somewhere....

$ npm run updatesemantic

javascriptobfuscator@1.0.0 updatesemantic c:\wamp64\nodejs\javascript-obfuscator-ui-master cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/

'cp' is not recognized as an internal or external command, operable program or batch file.

npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\wamp64\nodejs\node.exe" "C:\wamp64\nodejs\node_modules\npm\bin\npm-cli.js" "run" "updatesemantic" npm ERR! node v7.2.0 npm ERR! npm v3.10.9 npm ERR! code ELIFECYCLE npm ERR! javascriptobfuscator@1.0.0 updatesemantic: cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/ npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the javascriptobfuscator@1.0.0 updatesemantic script 'cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the javascriptobfuscator package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cp App/styles/theme.config ./node_modules/semantic-ui-less/theme.config; rm -Rf ./node_modules/semantic-ui-less/site; cp -R App/styles/site ./node_modules/semantic-ui-less/ npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs javascriptobfuscator npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls javascriptobfuscator npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! c:\wamp64\nodejs\javascript-obfuscator-ui-master\npm-debug. log error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

c:\wamp64\nodejs\javascript-obfuscator-ui-master>

On Tue, Nov 29, 2016 at 1:12 PM, Tiago Serafim notifications@github.com wrote:

fsevents isn't really necessary. You can comment it on packages.json.

Webpack is really slow on macOS without it, so I installed it, but I didn't know it wasn't compatible with Windows.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javascript-obfuscator/javascript-obfuscator-ui/issues/3#issuecomment-263651022, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWFtyh3PYdKhTUFXMiE_mVzuiwsSiEks5rDGsIgaJpZM4K_P7I .

slig commented 7 years ago

That's true. I can't imagine how hard it's to use all these modern tools on Windows.

This is a issue with a dirty hack to get semantic-ui work as expected. Please see https://github.com/Semantic-Org/Semantic-UI-LESS/issues/10#issuecomment-245908829

Now you have to run node server.js. Crossing fingers

paul-dev8 commented 7 years ago

thank you for your help. it worked! You might want to mention in your Readme that last bit about running node server.js and going to a browser at 127.0.0.1:3000. Those kind of little things trip up noobs ;)

On Tue, Nov 29, 2016 at 1:31 PM, Tiago Serafim notifications@github.com wrote:

That's true. I can't imagine how hard it's to use all these modern tools on Windows.

This is a issue with a dirty hack to get semantic-ui work as expected. Please see Semantic-Org/Semantic-UI-LESS#10 (comment) https://github.com/Semantic-Org/Semantic-UI-LESS/issues/10#issuecomment-245908829

Now you have to run node server.js. Crossing fingers

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javascript-obfuscator/javascript-obfuscator-ui/issues/3#issuecomment-263656374, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWFlLHdWkdZAKytYyYeSbVekaAp8PDks5rDG-FgaJpZM4K_P7I .

paul-dev8 commented 7 years ago

Also, quick question... Is there any reason not to disable console output, turn on debug protection, add a domain lock, or do string array encoding? Just wondering why they are checked off by default.

On Tue, Nov 29, 2016 at 1:37 PM, Paul P paulnexus85@gmail.com wrote:

thank you for your help. it worked! You might want to mention in your Readme that last bit about running node server.js and going to a browser at 127.0.0.1:3000. Those kind of little things trip up noobs ;)

On Tue, Nov 29, 2016 at 1:31 PM, Tiago Serafim notifications@github.com wrote:

That's true. I can't imagine how hard it's to use all these modern tools on Windows.

This is a issue with a dirty hack to get semantic-ui work as expected. Please see Semantic-Org/Semantic-UI-LESS#10 (comment) https://github.com/Semantic-Org/Semantic-UI-LESS/issues/10#issuecomment-245908829

Now you have to run node server.js. Crossing fingers

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/javascript-obfuscator/javascript-obfuscator-ui/issues/3#issuecomment-263656374, or mute the thread https://github.com/notifications/unsubscribe-auth/AXIWFlLHdWkdZAKytYyYeSbVekaAp8PDks5rDG-FgaJpZM4K_P7I .

slig commented 7 years ago

Will do, thanks for trying on a different platform!

I made the UI follow the same defaults the javascript-obfuscator library uses. There're tradeoffs for each option/

paul-dev8 commented 7 years ago

So, quick summary for those wanting to follow in my footsteps...

Download the code from repo Unpack Install yarn if it doesn't exist with npm install -g yarn Edit the package.json file and delete the line with fsevents Run yarn in the downloaded directory It should get through all the dependencies and when it errors out because of the missing copy and delete commands, go ahead and copy the files it's referencing in the errors to the appropriate places. npm run webpack:run Open a new console and go to the ui directory and do "node server.js" Go to a browser and open 127.0.0.1:3000

slig commented 7 years ago

Thank you, Paul! I updated the README as well.

milovantine commented 7 years ago

Thanks Tiago, this is awesome!

By the way, if someone is looking for this error while running "npm run webpack:dev":

0% compiling Webpack is watching the files…

69% building modules 850/851 modules 1 active ...pt-obfuscator-ui/App/styles/main.lessKilled

The solution is: Increase or add a swapfile to your server!

Cheers.

slig commented 7 years ago

You're welcome, @hoan-pham ! Thanks for posting your solution!