Description
Describe the bug
Can't run npm i
to completion with current master on MacOS. Post-install job "exec:fixCryptoApiImports" fails with a sed
error:
sed: can't read : No such file or directory
To Reproduce
I'm on MacOS 15.3.2, on a 2019 Intel MacBook Pro.
Installed node
and npm
using nvm
, the problem occurs both with the latest LTS and with node@18 and npm@8 as per the (possibly outdated) install instructions.
Then simply ran npm i
.
Output:
$ npm i
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@astronautlabs/[email protected]',
npm WARN EBADENGINE required: { node: '^14' },
npm WARN EBADENGINE current: { node: 'v18.20.8', npm: '8.19.4' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm WARN deprecated [email protected]: Use @natlibfi/loglevel-message-prefix instead
npm WARN deprecated [email protected]: Use @natlibfi/es6-polyfills instead
npm WARN deprecated @babel/[email protected]: 🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
> [email protected] postinstall
> npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup && npx grunt exec:fixJimpModule
Running "exec:fixCryptoApiImports" (exec) task
>> sed: can't read : No such file or directory
>> Exited with code: 1.
>> Error executing child process: Error: Process exited with code 1.
Warning: Task "exec:fixCryptoApiImports" failed. Use --force to continue.
Aborted due to warnings.
npm ERR! code 3
npm ERR! path /Users/bart/src/ext/CyberChef
npm ERR! command failed
npm ERR! command sh -c -- npx grunt exec:fixCryptoApiImports && npx grunt exec:fixSnackbarMarkup && npx grunt exec:fixJimpModule
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/bart/.npm/_logs/2025-04-03T10_55_46_184Z-debug-0.log
Expected behaviour
No errors during npm i
.
Desktop:
- OS: MacOS 15.3.2
- Browser: N/A
- CyberChef version: 10.19.4 (current master)
Additional context
This seems to be related with the special case for "darwin" in the affected job. If I remove the ''
argument to the -i
command line parameter to sed
, the job completes. Presumably, at some point, MacOS started shipping a more compatible version of sed
.
This must be done for the fixSnackbarMarkup
and fixJimpModule
jobs as well. So basically, the whole special casing can be removed for recent MacOS versions, it seems.