-
Notifications
You must be signed in to change notification settings - Fork 49
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
Error: Cannot read properties of undefined (reading '_data') #223
Comments
While to me, at first glance, this doesn't much look like a nuxt-directus issue. Could you confirm that you aren't getting hydration errors/warnings in the browser's devtool console? |
Is there any chance that you can create a smaller reproduction project whichs only related to nuxt-directus? |
yes. here's the link. i use sqlite on this one so you should easily setup this one |
Other than filling up the |
I have a very similar problem. "createItems" throws an error "Cannot read properties of undefined (reading 'data') at createItems", although creation is successful and everything works as expected. UPD: |
sadly this is not working on my side. |
And there is no error from nuxt-directus logged in the browser console? |
Might be worth a shot, since it is the only other change I did on my side: in export default defineEventHandler(event => {
//console.log(`new request: ${event._path}`);
}); I wouldn't be surprised, on a laptop, to see the node server being slowed down by the OS at a point where it wouldn't also let it fetch the data from directus. But honestly, without other information, this one is quite hard to debug |
no this also does not help. |
That's the hard part, basically any log/error regarding fetch or directus could help. Currently I have no idea in mind other than starting from a clean state (no |
here im just trying to directly use directus sdk and even using directus sdk directly got an error fetching the data from server side using async data. i supposed this has something to do with directus sdk or directus setup, but still cannot find the source of the problem |
Could you use Postman/Hoppscotch/HTTPie to quickly test your |
![]() yes, it does work. so it is nuxt related problems? |
Can you try to make the request using ofetch and check if the issue still persists? |
i found a solution, i think this happen related to this error on nodejs 18 nodejs/node#40702 |
You mean with |
yes i tried everything including axios. and the result the same. the only solution is to upgrade node version |
can you help confirm this really happen when you use node |
I'll try to test it, once I get back home |
So, I can confirm that on But now that I think about it I remember reading in the nuxt Anyway, I would consider this issue closed since, to me, it does not seem to be directly related to nuxt-directus itself, but just a combination of node+nuxt versions |
thankyou! |
Version
nuxt-directus: 5.6.0
nuxt: 3.8.2
Reproduction Link
https://github.com/hi-reeve/nuxt-directus-test
Steps to reproduce
server:false
What is Expected?
nuxt.config.ts
the code
the result
![image](https://private-user-images.githubusercontent.com/45350572/288600078-4abce2dd-73fd-4dc0-b4a8-450d3e8e8fe4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxMTE0MzUsIm5iZiI6MTcyNjExMTEzNSwicGF0aCI6Ii80NTM1MDU3Mi8yODg2MDAwNzgtNGFiY2UyZGQtNzNmZC00ZGMwLWI0YTgtNDUwZDNlOGU4ZmU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDAzMTg1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4ZWIwYWFiMWU5OWE0NzNkMjcwZjQ3NjI0YWEwNjMxODgwOWY1OWYzNzRhNmE0NGZlNDJhZTZmOTNlMTNjNWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.waKYTEIp-ifhSWAGeXvYlM6hNuBeQh4JCTjurhN0vaI)
The text was updated successfully, but these errors were encountered: