Skip to content
New issue

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

Misc: Won't run on Localhost Chrome Windows 10 #631

Closed
FredHappyface opened this issue Sep 4, 2019 · 3 comments
Closed

Misc: Won't run on Localhost Chrome Windows 10 #631

FredHappyface opened this issue Sep 4, 2019 · 3 comments

Comments

@FredHappyface
Copy link

I have followed the instructions as on: https://github.com/gchq/CyberChef/wiki/Getting-started#installing and have run the command 'grunt dev'

When accessing this from Chrome 76 on a Windows 10 system 1903, node 10.15.3 I receive the following error:

Uncaught Error: Cannot find module '../core/config/OperationConfig.json'
Filename: webpack:///./src/web/index.js?
Line: 16
Column: 145
Error: Error: Cannot find module '../core/config/OperationConfig.json'
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
CyberChef version: 9.2.3

Would it be possible for someone to point me in the right direction?

Thanks

@n1474335
Copy link
Member

n1474335 commented Sep 9, 2019

Can you give the output you get from the terminal when you run grunt dev please? Thanks

@Ge0rg3
Copy link
Contributor

Ge0rg3 commented Sep 9, 2019

I faced a similar issue due to how file paths are handled in Windows, and ended up using WSL instead.

@FredHappyface
Copy link
Author

I've managed to solve the issue.

Steps involved:

  1. Enable WSL and Install Ubuntu 18.04.3 LTS
    Install Ubuntu 18.04 LTS and run
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
  1. Add the node 10 LTS repository
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
  1. Apt install nodejs (node v10.16.3)
sudo apt install nodejs
  1. Install grunt as in the getting-started file
  2. Install
npm install
  1. Fix critical vulnerabilities (I suspect this was the cause of the issue)
npm audit fix
  1. Run grunt dev
grunt dev

For reference the output is

Running "clean:dev" (clean) task
>> 0 paths cleaned.

Running "clean:config" (clean) task
>> 0 paths cleaned.

Running "exec:generateConfig" (exec) task
'

Running "concurrent:dev" (concurrent) task
    Running "watch:config" (watch) task
    Waiting...
    Running "webpack-dev-server:start" (webpack-dev-server) task
    i 「wds」: Project is running at http://0.0.0.0:8080/webpack-dev-server/
    i 「wds」: webpack output is served from /
    i 「wds」: Content not from webpack is served from C:\Users\[user]\Documents\GitHub\CyberChef
    Project is running at http://0.0.0.0:8080/webpack-dev-server/
    webpack output is served from /
    × 「wdm」: Hash: fd2d0ff9ab2df936cab2
    Version: webpack 4.35.2
    Time: 15435ms
    Built at: 09/09/2019 9:11:20 PM
                                          Asset      Size  Chunks                    Chunk Names
    assets/2222e0f0d27628448f8b43c5b1b92a2b.png  18.9 KiB          [emitted]
    assets/bbeb1cb706c83842350985cb958dc29c.png  1.27 MiB          [emitted]  [big]
                                assets/main.css   698 KiB    main  [emitted]  [big]  main
                     images/cook_male-32x32.png  2.16 KiB          [emitted]
                   images/cyberchef-128x128.png  7.81 KiB          [emitted]
                        images/file-128x128.png  89 bytes          [emitted]
                          images/file-32x32.png  2.58 KiB          [emitted]
                             images/fork_me.png  7.14 KiB          [emitted]
                                 images/map.png  89 bytes          [emitted]
                                     index.html  87.1 KiB          [emitted]
                                        main.js  5.49 MiB    main  [emitted]  [big]  main

    ERROR in ./src/web/index.js
    Module not found: Error: Can't resolve '../core/config/OperationConfig.json' in 'C:\Users\[user]\Documents\GitHub\CyberChef\src\web'
     @ ./src/web/index.js 18:0-66 44:35-50
    i 「wdm」: Failed to compile.
Terminate batch job (Y/N)?

Thank you for your help. I hope someone finds this solution useful.

Now the setup is out of the way, I can make a start on the fun bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants