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

500 useT3Api is not defined #346

Closed
cehret opened this issue Dec 2, 2024 · 3 comments
Closed

500 useT3Api is not defined #346

cehret opened this issue Dec 2, 2024 · 3 comments

Comments

@cehret
Copy link

cehret commented Dec 2, 2024

Hello!
I have a very strange behavior when fetching a new installation with nuxt-typo3.
I got the error:
500
useT3Api is not defined
500

This happens if I checkout a running app from git, run npm install and nuxt dev, but it also happens if I setup a completely new app, like described here: https://t3headless.macopedia.io/nuxt-typo3/introduction:
npx nuxi@latest init -t gh:TYPO3-Headless/nuxt-typo3-starter <project-name>

The same procedure worked some days ago, without any problems! So I can have the same app checked out from git on the same computer (it does not matter if macOS or Windows) twice - one checked out I guess about 1 or 2 weeks ago working and one checkt out today not working!

If I remove node_modules directory from the non-working installation and copy node_modules directory form a working (older) one, the non-working will work! I suspect it is a newer version of some package which is causing it to no longer work? But which one?

Any ideas how I can better narrow down the error? The consoles and the NuxtDevTools do not provide any valuable information for me :-(

@cehret
Copy link
Author

cehret commented Dec 3, 2024

today I can't even kickstart a new project
https://github.com/user-attachments/assets/204a72c1-e078-445a-9c24-f22ecc832c6e

@mercs600
Copy link
Contributor

mercs600 commented Dec 3, 2024

@cehret we are working on it.
Somehow, the composables we provided for autoimports are no longer being resolved.
As a temporary workaround, you can import our composables through the #typo3 alias.

import { useT3Api } from '#typo3/composables/useT3Api'

@cehret
Copy link
Author

cehret commented Dec 6, 2024

cannot reproduce the issue anymore - it seems that the error has been fixed

@tmotyl tmotyl closed this as completed Dec 6, 2024
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

3 participants