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

Can't import from 'ably/react' on v2 branch #1622

Closed
VeskeR opened this issue Feb 15, 2024 · 2 comments · Fixed by #1625
Closed

Can't import from 'ably/react' on v2 branch #1622

VeskeR opened this issue Feb 15, 2024 · 2 comments · Fixed by #1625
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@VeskeR
Copy link
Contributor

VeskeR commented Feb 15, 2024

package.json exports field does not define export for 'ably/react', so we get an error when trying to import from this path in real application:

┆Issue is synchronized with this Jira Bug by Unito

@VeskeR VeskeR added the bug Something isn't working. It's clear that this does need to be fixed. label Feb 15, 2024
@danielrhodes
Copy link

This is because they haven't properly implemented or exported their types correctly.

@ably ably deleted a comment from sync-by-unito bot Feb 18, 2024
VeskeR added a commit that referenced this issue Feb 19, 2024
Also removes "exports" property from package.react.json in react-hooks
folder that is copied to `react` build folder. This file now only has
`"main": "./cjs/index.js"`, which, for not obvious reason to me, needs
to be present in order for `npx attw` check to not show "Resolution
failed" error for node10 for "ably/react" path.

Resolves #1622
VeskeR added a commit that referenced this issue Feb 21, 2024
Similar to 9976a84, adds a test for
importing from `ably/react` from ably-js NPM package. This test will
catch NPM package errors like in #1622.

Followed playwright for Components guide [1] to setup this.

[1] https://playwright.dev/docs/test-components
VeskeR added a commit that referenced this issue Feb 21, 2024
Similar to 9976a84, adds a test for
importing from `ably/react` from ably-js NPM package. This test will
catch NPM package errors like in #1622.

Followed playwright for Components guide [1] to setup this.

[1] https://playwright.dev/docs/test-components
VeskeR added a commit that referenced this issue Feb 21, 2024
Similar to 9976a84, adds a test for
importing from `ably/react` from ably-js NPM package. This test will
catch NPM package errors like in #1622.

Followed playwright for Components guide [1] to setup this.

[1] https://playwright.dev/docs/test-components
@VeskeR
Copy link
Contributor Author

VeskeR commented Feb 26, 2024

Fixed in #1625

@VeskeR VeskeR closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

Successfully merging a pull request may close this issue.

2 participants