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

Problem importing #8

Open
tanjunior opened this issue Jan 25, 2024 · 4 comments
Open

Problem importing #8

tanjunior opened this issue Jan 25, 2024 · 4 comments

Comments

@tanjunior
Copy link

Could not import

image

@vkuprin
Copy link
Contributor

vkuprin commented Feb 29, 2024

@tanjunior The solution for this case mentioned here #6 (comment) by creating another d.ts file

@tanjunior
Copy link
Author

tanjunior commented Mar 1, 2024

@tanjunior The solution for this case mentioned here #6 (comment) by creating another d.ts file

vscode doesn't complain about import errors anymore but getting this error when running.
Attempted import error: 'AutoViewTransitionsOnClick' is not exported from 'use-view-transitions/next' (imported as 'AutoViewTransitionsOnClick').

EDIT:
I checked next-vt.d.ts in the package and AutoViewTransitionsOnClick is not exported from it.

Importing it from use-view-transitions/react seems to have get rid of the error

import { EnableNextAppRouterViewTransitions } from "use-view-transitions/next";
import { AutoViewTransitionsOnClick } from "use-view-transitions/react";

EDIT2:
Still can't get it to work. Not sure if I am doing anything wrong. codesandbox

@vkuprin
Copy link
Contributor

vkuprin commented Mar 6, 2024

@tanjunior Checked your codesandbox. It seems you didn't include in tsconfig your d.ts file, that's why it's complaining of ts-error. "include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts", YOUR_DTS]. Check tsconfig.json

@tanjunior
Copy link
Author

tanjunior commented Mar 10, 2024

@tanjunior Checked your codesandbox. It seems you didn't include in tsconfig your d.ts file, that's why it's complaining of ts-error. "include": ["next-env.d.ts", "/*.ts", "/.tsx", ".next/types/**/.ts", YOUR_DTS]. Check tsconfig.json

Doing that still doesn't let me import AutoViewTransitionsOnClick from use-view-transitions/next.
With the same error Attempted import error: 'AutoViewTransitionsOnClick' is not exported from 'use-view-transitions/next' (imported as 'AutoViewTransitionsOnClick').
Importing AutoViewTransitionsOnClick from use-view-transitions/react solves the error. But transition is not working as shown in the codesandbox

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

No branches or pull requests

2 participants