Hono is not working on netlify (Function crashed)
Hey! I'm totally new to hono. I tried to use hono for netlify but it's not working. here's all the code:
The command I ran is
The error i get is:
netlify/edge-functions/index.tsnetlify/edge-functions/index.tsimport { Hono } from 'jsr:@hono/hono'
import { handle } from 'jsr:@hono/hono/netlify'
const app = new Hono()
app.get('/', (c) => {
return c.text('Hello Hono!')
})
export default handle(app)import { Hono } from 'jsr:@hono/hono'
import { handle } from 'jsr:@hono/hono/netlify'
const app = new Hono()
app.get('/', (c) => {
return c.text('Hello Hono!')
})
export default handle(app)netlify.tomlnetlify.toml[[edge_functions]]
function = "index"
path = "/*"[[edge_functions]]
function = "index"
path = "/*"The command I ran is
netlify devnetlify devThe error i get is:
Error - Could not find function 'index'
Error: Could not find function 'index'
at FunctionChain.getFunction (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/function_chain.ts:240:13)
at FunctionChain.runFunction (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/function_chain.ts:340:23)
at FunctionChain.run (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/function_chain.ts:310:31)
at handleRequest (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/handler.ts:80:34)
at Server. (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/server.ts:28:23)
at Server.#respond (https://deno.land/std@0.170.0/http/server.ts:299:37)
at Server.#serveHttp (https://deno.land/std@0.170.0/http/server.ts:346:20)
at eventLoopTick (ext:core/01_core.js:183:11)Error - Could not find function 'index'
Error: Could not find function 'index'
at FunctionChain.getFunction (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/function_chain.ts:240:13)
at FunctionChain.runFunction (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/function_chain.ts:340:23)
at FunctionChain.run (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/function_chain.ts:310:31)
at handleRequest (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/handler.ts:80:34)
at Server. (https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/server.ts:28:23)
at Server.#respond (https://deno.land/std@0.170.0/http/server.ts:299:37)
at Server.#serveHttp (https://deno.land/std@0.170.0/http/server.ts:346:20)
at eventLoopTick (ext:core/01_core.js:183:11)
