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?
Do you have the "main" field in your package.json?
https://docs.npmjs.com/cli/v7/configuring-npm/package-json#main
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.