Cyberchef: Bug report: Node API breaks on crypto-api import

Created on 9 Jul 2019  路  3Comments  路  Source: gchq/CyberChef

Issue raised on crypto-api repo to fix: https://github.com/nf404/crypto-api/issues/12

bug

Most helpful comment

The current release of the Node API is only tested against Node LTS, so v10.13.0. We need that crypto-api fix to make it compatible with other versions, but I'll document valid versions of Node somewhere

All 3 comments

The current release of the Node API is only tested against Node LTS, so v10.13.0. We need that crypto-api fix to make it compatible with other versions, but I'll document valid versions of Node somewhere

I'll correct myself: the current cyberchef release throws the same ERR_REQUIRE_ESM error if you require it.

There is a workaround if the consuming application uses esm, which is to import the source index:

import chef from "cyberchef/src/node/index"

I assume that conforms with what you experienced?

After #600 was merged you should now be able to use top-level imports up to and including node v12. Named imports still do not work with v12 for the same reason we got before.

Was this page helpful?
0 / 5 - 0 ratings