You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ yarn node -r @swc-node/register/esm
yarn node v1.22.19
node:internal/modules/cjs/loader:571
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './esm' is not defined by "exports"in /home/item4/proj/blog/node_modules/@swc-node/register/package.json
at new NodeError (node:internal/errors:399:5)
at exportsNotFound (node:internal/modules/esm/resolve:361:10)
at packageExportsResolve (node:internal/modules/esm/resolve:641:13)
at resolveExports (node:internal/modules/cjs/loader:565:36)
at Module._findPath (node:internal/modules/cjs/loader:634:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1061:27)
at Module._load (node:internal/modules/cjs/loader:920:27)
at internalRequire (node:internal/modules/cjs/loader:174:19)
at Module._preloadModules (node:internal/modules/cjs/loader:1431:5)
at loadPreloadModules (node:internal/process/pre_execution:606:5) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v18.15.0
error Command failed.
Exit code: 1
Command: /home/item4/.nvm/versions/node/v18.15.0/bin/node
Arguments: -r @swc-node/register/esm
Directory: /home/item4/proj/blog
Output:
info Visit https://yarnpkg.com/en/docs/cli/node for documentation about this command.
The text was updated successfully, but these errors were encountered:
item4
changed the title
@swc-node/register/esm can not usable
can not register @swc-node/register/esm with ERR_PACKAGE_PATH_NOT_EXPORTED error
Mar 23, 2023
Reproduce
Used package.json and tsconfig.json are here: https://github.com/item4/item4.github.io/tree/a302e5c08baaf26a1aea3c07d28465e1a7f8e4b3
The text was updated successfully, but these errors were encountered: