Skip to content
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

Help - how you import / use fastify on Deno #1071

Closed
mrymahmadi opened this issue Nov 28, 2024 · 1 comment
Closed

Help - how you import / use fastify on Deno #1071

mrymahmadi opened this issue Nov 28, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@mrymahmadi
Copy link

i used
import Fastify, { FastifyReply, FastifyRequest } from "npm:fastify";
and
import Fastify from "https://deno.land/x/fastify";

my server index.ts:
import Fastify, { FastifyReply, FastifyRequest } from "npm:fastify";
const fastify = Fastify({ logger: true });

fastify.get("/", () => {
return "Hello world!";
});

fastify.listen({ host: "0.0.0.0", port: 80 }, (error, address) => {
if (error) {
console.error(error);
Deno.exit(1);
}
console.info(Server started. Listening on ${address});
});

but i when run project, received this message:
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'node')
at Object. (file://.cache/deno/npm/registry.npmjs.org/sonic-boom/4.2.0/index.js:20:42)
at Object. (file://.cache/deno/npm/registry.npmjs.org/sonic-boom/4.2.0/index.js:721:4)
at Module._compile (node:module:748:34)
at Object.Module._extensions..js (node:module:767:10)
at Module.load (node:module:665:32)
at Function.Module._load (node:module:537:12)
at Module.require (node:module:684:19)
at require (node:module:808:16)
at Object. (file://.cache/deno/npm/registry.npmjs.org/pino/9.5.0/lib/tools.js:7:19)
at Object. (file://.cache/deno/npm/registry.npmjs.org/pino/9.5.0/lib/tools.js:396:4)

Deno version: 2.0.3

@mrymahmadi mrymahmadi added the help wanted Extra attention is needed label Nov 28, 2024
@mrymahmadi mrymahmadi changed the title Help - how you import / use fasify on Deno Help - how you import / use fastify on Deno Nov 28, 2024
@jsumners
Copy link
Member

Thank you for the report. This project targets the Node.js runtime. If you are encountering issues using another runtime, please file issues with them.

@jsumners jsumners closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants