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" main target #8

Merged
merged 1 commit into from
May 14, 2024
Merged

Fix "exports" main target #8

merged 1 commit into from
May 14, 2024

Conversation

RaisinTen
Copy link
Owner

For CJS require("perftrace"):

Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.cjs" defined in the package config .../node_modules/perftrace/package.json; targets must start with "./"

For ESM import ... from "perftrace":

Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.mjs" defined in the package config .../node_modules/perftrace/package.json imported from ....mjs; targets must start with "./"

For CJS `require("perftrace")`:
```
Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.cjs" defined in the package config .../node_modules/perftrace/package.json; targets must start with "./"
```

For ESM `import ... from "perftrace"`:
```
Error [ERR_INVALID_PACKAGE_TARGET]: Invalid "exports" main target "index.mjs" defined in the package config .../node_modules/perftrace/package.json imported from ....mjs; targets must start with "./"
```

Signed-off-by: Darshan Sen <raisinten@gmail.com>
@RaisinTen RaisinTen merged commit 5ed1802 into main May 14, 2024
9 checks passed
@RaisinTen RaisinTen deleted the fix-exports-main-target branch May 14, 2024 10:18
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.

1 participant