Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exports in package.json #16

Closed
wants to merge 1 commit into from

Conversation

yaser-abclabs
Copy link

When importing the package, it will complain and show this message:

Error: Package subpath './dist' is not defined by "exports" in /Users/yaser/dev/my-project/node_modules/oxide.ts/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:439:9)
at packageExportsResolve (node:internal/modules/esm/resolve:718:3)
at resolveExports (node:internal/modules/cjs/loader:493:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:533:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
at Function.Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1022:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/yaser/dev/my-project/src/results/service.ts:14:1)
[ERROR] 16:15:04 Error: Package subpath './dist' is not defined by "exports" in /Users/yaser/dev/my-project/node_modules/oxide.ts/package.json

This issue is similar to this issue in jasmine-ts: https://stackoverflow.com/a/72840981/4565520

@yaser-abclabs
Copy link
Author

Closing this as I realized that instead of:

import { Err, Ok, Result } from 'oxide.ts/dist';

It should be:

import { Err, Ok, Result } from 'oxide.ts';

@yaser-abclabs yaser-abclabs deleted the patch-1 branch March 2, 2023 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant