Error on using useFetch
See original GitHub issueEnvironment
- Operating System:
Windows_NT
- Node Version:
v14.16.0
- Nuxt Version:
3-3.0.0-27234211.2a0afbd
- Package Manager:
Yarn
- Bundler:
Webpack
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Describe the bug and expected behavior
error on using the useFetch composable
index.vue
<script setup lang="ts">
import { useFetch } from "nuxt3";
const { data } = await useFetch("https://jsonplaceholder.typicode.com/posts");
console.log(data);
</script>
<template>
<div>index</div>
</template>
<style scoped></style>
Steps to reproduce
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
useFetch
Runs when the request get's an error. If retrying, it is only called on the last retry attempt. empty function. onNewData, Merges the...
Read more >Handling errors on nuxt3 usefetch - vue.js - Stack Overflow
On error itself it returns ref with _error that contains object with errors. However I cannot get to those errors anyhow.. vue.js ·...
Read more >Handling errors with useFetch : r/Nuxt - Reddit
Hi, I'm trying starting to mess around with useFetch, and I can't understand how you handle errors with it. Code:
Read more >How to fetch data in React (with error handling) - LinkPe
This guide explains how you can fetch data in React, step by step. Check out some popular tools you can use in React...
Read more >useFetch - Raycast API
useFetch. Hook which fetches the URL and returns the AsyncState corresponding ... By default, it will log the error and show a generic...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i fix it by reinstalling the
node_modules
. that’s so weird 🤔🤔Not working with my api, which is hosted in Heroku 😭