CyberChef icon indicating copy to clipboard operation
CyberChef copied to clipboard

Bug report: Install Error on Windows

Open depperm opened this issue 2 years ago • 7 comments

Describe the bug

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@astronautlabs/[email protected]',
npm WARN EBADENGINE   required: { node: '^14' },
npm WARN EBADENGINE   current: { node: 'v18.15.0', npm: '9.5.0' }
npm WARN EBADENGINE }

...

> [email protected] postinstall
> npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup

Running "exec:fixCryptoApiImports" (exec) task

Done.
Running "exec:fixSnackbarMarkup" (exec) task
>> The system cannot find the file specified.
>> Exited with code: 1.
>> Error executing child process: Error: Process exited with code 1.
Warning: Task "exec:fixSnackbarMarkup" failed. Use --force to continue.

Aborted due to warnings.
npm ERR! code 3
npm ERR! path D:\code\CyberChef
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\epper\AppData\Local\npm-cache\_logs\2023-03-30T21_37_44_442Z-debug-0.log

To Reproduce Follow guide: https://github.com/gchq/CyberChef/wiki/Getting-started#installing

See error

Expected behaviour The npm i to work

Desktop (if relevant, please complete the following information):

  • OS: Windows 10
  • Git: 2.29.2.windows.3
  • Node: 18.15.0
  • CyberChef version: 10.4.0

depperm avatar Mar 30 '23 21:03 depperm

Have you solved the problem ?

XDora avatar Apr 04 '23 07:04 XDora

no

depperm avatar Apr 04 '23 10:04 depperm

It looks like you are trying to install/compile on Windows.

In the compiling part of the CyberChef Wiki, we detail that the main supported dev environments are Mac/Linux.

While CyberChef might build on Windows, we cannot attest to the current state it is in. To get it working on Windows will require some unofficial and unsupported changes to the code base.

I'm going to leave this open as we may choose to add Windows support in the future.

n1073645 avatar Apr 14 '23 08:04 n1073645

I get this same issue on both my Kali, and Ubuntu VM. I've seen multiple posts reporting this bug, with no fixes. This is not exclusively a Windows problem

Cole-Hoffele avatar Apr 18 '23 18:04 Cole-Hoffele

This function is defined here.

On Ubuntu, sed should be installed so I'd guess it cannot find the file it is trying to process.

You could have a look at your directory structure to see if it is the same as what that command expects?

n1073645 avatar Apr 21 '23 08:04 n1073645

grunt-exec package uses child_process.exec to execute command. By default, on Windows, the shell used to execute commands is cmd.exe, which cannot find sed since it is not in the PATH. (Refer to grunt-exec options.shell and NodeJS docs).

To use Git Bash, change process.env.ComSpec to point to the Git Bash path. and run npm i:

export COMSPEC="C:\\Program Files\\Git\\bin\\bash.exe"
npm i

black-night-heron avatar May 08 '23 19:05 black-night-heron

grunt-exec package uses child_process.exec to execute command. By default, on Windows, the shell used to execute commands is cmd.exe, which cannot find sed since it is not in the PATH. (Refer to grunt-exec options.shell and NodeJS docs).

To use Git Bash, change process.env.ComSpec to point to the Git Bash path. and run npm i:

export COMSPEC="C:\\Program Files\\Git\\bin\\bash.exe"
npm i

Works like a charm!

jairtontf avatar Jan 17 '24 15:01 jairtontf