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

Add "types" field to fix error when using "moduleResolution": "NodeNext" #1369

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Add "types" field to fix error when using "moduleResolution": "NodeNext" #1369

merged 2 commits into from
Apr 18, 2024

Conversation

stefansundin
Copy link
Contributor

Hello,

In my project I am attempting to use "moduleResolution": "NodeNext" in my tsconfig.json file, and importing rrweb types like this:

import { type eventWithTime } from '@rrweb/types';

But it results in this error:

Could not find a declaration file for module '@rrweb/types'. '/Users/admin/project/node_modules/@rrweb/types/dist/types.js' implicitly has an 'any' type.
There are types at '/Users/admin/project/node_modules/@rrweb/types/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@rrweb/types' library may need to update its package.json or typings.

After searching online and testing a few things, making the change in this PR made the error go away.

Please let me know if you want any other changes. Thanks!

Copy link

changeset-bot bot commented Dec 7, 2023

🦋 Changeset detected

Latest commit: 2d68597

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@rrweb/types Patch
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/web-extension Patch
rrvideo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@stefansundin
Copy link
Contributor Author

Any chance there's a maintainer that can take a look at this? Pretty please. 🥺

@Juice10 Juice10 merged commit c278d06 into rrweb-io:master Apr 18, 2024
6 checks passed
@Juice10
Copy link
Contributor

Juice10 commented Apr 18, 2024

Thanks @stefansundin, this PR #1033 is also on the horizon which also fixes this. But I'm more then happy to get your version shipped asap

billyvg pushed a commit to getsentry/rrweb that referenced this pull request Apr 26, 2024
…xt" (rrweb-io#1369)

* Add "types" field to fix error when using "moduleResolution": "NodeNext".

* Add changeset.
billyvg pushed a commit to getsentry/rrweb that referenced this pull request Apr 26, 2024
…xt" (rrweb-io#1369)

* Add "types" field to fix error when using "moduleResolution": "NodeNext".

* Add changeset.
jaj1014 pushed a commit to pendo-io/rrweb that referenced this pull request Apr 30, 2024
…xt" (rrweb-io#1369)

* Add "types" field to fix error when using "moduleResolution": "NodeNext".

* Add changeset.
jxiwang pushed a commit to amplitude/rrweb that referenced this pull request Jul 31, 2024
…xt" (rrweb-io#1369)

* Add "types" field to fix error when using "moduleResolution": "NodeNext".

* Add changeset.
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.

2 participants