No "exports" main defined in Node module's package.json

Viewed 946

I just installed the zx NPM package.

I installed it locally and imported it:

import { $ } from 'zx'

(async () => {
    await $`mkdir test`
})()

But I'm getting this error:

No "exports" main defined in /home/alex/node/check-image-size/node_modules/zx/package.json

Note: I'm using Node 16.14.

What does this kind of error mean, and how can I fix it?

1 Answers
Related