What version of this package are you using?
10.0.0
What operating system, Node.js, and npm version?
MacOS Ventura 13.0.1 M1 Pro Chip
Tried on both Node.js v 18.12.1 and 14.21.1
pnpm 7.17.1
What happened?
When I symply import the package with import parseTorrent from "parse-torrent"; I got his error:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/johann/Dev/perso/netflux/backend/node_modules/parse-torrent/package.json
at new NodeError (internal/errors.js:322:7)
at throwExportsNotFound (internal/modules/esm/resolve.js:332:9)
at packageExportsResolve (internal/modules/esm/resolve.js:523:7)
at resolveExports (internal/modules/cjs/loader.js:450:36)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/Users/johann/Dev/perso/netflux/backend/src/app.ts:3:1)
[ERROR] 16:24:27 Error: No "exports" main defined in /Users/johann/Dev/perso/netflux/backend/node_modules/parse-torrent/package.json
What did you expect to happen?
Being able to import this package in an ES6 env
Are you willing to submit a pull request to fix this bug?
Not sure what's going on so sadly, no.
Edit: Backed to 9.1.5 and everything works fine
What version of this package are you using?
10.0.0
What operating system, Node.js, and npm version?
MacOS Ventura 13.0.1 M1 Pro Chip
Tried on both Node.js v 18.12.1 and 14.21.1
pnpm 7.17.1
What happened?
When I symply import the package with
import parseTorrent from "parse-torrent";I got his error:What did you expect to happen?
Being able to import this package in an ES6 env
Are you willing to submit a pull request to fix this bug?
Not sure what's going on so sadly, no.
Edit: Backed to 9.1.5 and everything works fine