throw new ERR_MODULE_NOT_FOUND [Nodejs Template]
Following this guide
https://hono.dev/docs/getting-started/nodejs#dockerfile
i'm trying to create two scripts: one for build ("tsc") and anthoer for start the build ("node dist/index.js) buit i got this error
to reproduce the errors:
- npm create hono@latest ./foo-hono (nodejs template)
- npm install typescript --save-dev
- Add "build": "tsc" to script section of package.json
- Add "start": "node dist/index.js" to script section of package.json
- Add "exclude": ["node_modules"] to tsconfig.json.
- Add "outDir": "./dist" to the compilerOptions section tsconfig.json.
- Add "type": "module" to package.json.
- create a file foo.ts with a funcition that runs a console.log
- use it in the index.ts
run
- npm run build
- npm run start
Can someone help me?
Can someone help me?
Node.js - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
1 Reply
I also got into this problem