Giter Site home page Giter Site logo

Comments (10)

justinnoel avatar justinnoel commented on July 28, 2024 1

Thanks for the response. That's the sample I was using.

On previous versions of Hono with Miniflare 2.2.0, I was getting the error above. Now, with Hono 0.0.16, it's all resolved 🎉!

So, something in #55 probably fixed this issue.

Thanks again!

from hono.

justinnoel avatar justinnoel commented on July 28, 2024

Actually, maybe not necessarily Miniflare but the new Wrangler2 wrangler@beta?

from hono.

yusukebe avatar yusukebe commented on July 28, 2024

Hi @justinnoel

I've tried a Durable Object example with Miniflare 2.2.0. It worked correctly.
Example is here: https://github.com/yusukebe/hono/tree/master/example/durable-objects
This code is based on the official example. It might be well if you use latest version of Hono. If it does not work, let's think about it together.

from hono.

MatteoGauthier avatar MatteoGauthier commented on July 28, 2024

Got the same ▲ [WARNING] Failed to get worker definitions TypeError: fetch failed issue with Workers KV on the 3.1.0 version

from hono.

yusukebe avatar yusukebe commented on July 28, 2024

Hi @MatteoGauthier !

Could you provide some snippets to reproduce the problem?

I've tried to run the simple application using KV with v3.1.0. It works well.

import { Hono } from 'hono'

type Bindings = {
  FOO: KVNamespace
}

const app = new Hono<{ Bindings: Bindings }>()

app.get('/', async (c) => {
  await c.env.FOO.put('name', 'Hono')
  const val = await c.env.FOO.get('name')
  return c.text(`Hello ${val}`)
})

export default app

from hono.

MatteoGauthier avatar MatteoGauthier commented on July 28, 2024

Hi @MatteoGauthier !

Could you provide some snippets to reproduce the problem?

I've tried to run the simple application using KV with v3.1.0. It works well.

import { Hono } from 'hono'

type Bindings = {
  FOO: KVNamespace
}

const app = new Hono<{ Bindings: Bindings }>()

app.get('/', async (c) => {
  await c.env.FOO.put('name', 'Hono')
  const val = await c.env.FOO.get('name')
  return c.text(`Hello ${val}`)
})

export default app

Oh sorry, here is a reproduction repository for the issue : https://github.com/MatteoGauthier/hono-fetch-issue-kv

from hono.

yusukebe avatar yusukebe commented on July 28, 2024

Thanks! I'll try it.

from hono.

yusukebe avatar yusukebe commented on July 28, 2024

@MatteoGauthier

I've tried your repo, but it works fine.

I did:

  1. Clone the repo.
  2. yarn install
  3. yarn dev
  4. Run curl command

SS

You get an error when you start up Wrangler with the --local option, right?

from hono.

MatteoGauthier avatar MatteoGauthier commented on July 28, 2024

@yusukebe Yes exactly with --local (tested with latest wrangler version)

from hono.

yusukebe avatar yusukebe commented on July 28, 2024

I see. But I can't seem to reproduce the issue. Hmm.

from hono.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.