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
However, the following error occurred when executing "ts-node src/test.ts". I can't find the cause. According to the error content, I ask because I think I can ask a question about this on ts-node.
Please let me know if anyone knows why or how to fix this error.
*Specifically, i am trying to use "dot-prop" package
The following error occurred
> start
> ts-node --esm ./src/test.ts
node:internal/modules/cjs/loader:536
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './Users/woo94/Desktop/Dev/json-diff-test/node_modules/ts-node/dist/child/child-require.js' is not defined by "exports"in /Users/woo94/Desktop/Dev/json-diff-test/package.json imported from /Users/woo94/Desktop/Dev/json-diff-test/
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
at packageExportsResolve (node:internal/modules/esm/resolve:649:3)
at trySelf (node:internal/modules/cjs/loader:530:34)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1003:24)
at Function.Module._load (node:internal/modules/cjs/loader:871:27)
at internalRequire (node:internal/modules/cjs/loader:169:19)
at Module._preloadModules (node:internal/modules/cjs/loader:1373:5)
at loadPreloadModules (node:internal/bootstrap/pre_execution:583:5)
at prepareMainThreadExecution (node:internal/bootstrap/pre_execution:95:3) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I set my project as ESM by referring to the contents of #1007 (comment) and https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c .
However, the following error occurred when executing "ts-node src/test.ts". I can't find the cause. According to the error content, I ask because I think I can ask a question about this on ts-node.
Please let me know if anyone knows why or how to fix this error.
*Specifically, i am trying to use "dot-prop" package
The following error occurred
Environment
npx gts init
This is my package.json file.
This is part of my ts-config.json file.
Beta Was this translation helpful? Give feedback.
All reactions