whois-json whois npm package lib lib不在bun中工作

发布于 2025-01-30 05:21:28 字数 330 浏览 5 评论 0原文

因此,我有这个简单的文件whois.js

”代码nipet

它非常简单,在节点中它可以正常运行,并且在bun中永远运行。 在图像中,它显示了节点的返回以及我强迫取消该过程的时间。

我真的不知道要在问题中提出什么,如果您需要更多信息,请评论,我会提供。

so I have this simple file whois.js:

code snipet and log

It's pretty simple, in node it works and in bun just runs forever.
In the image it shows the return in node and the time it took until I forced cancelled the process in bun.

I don't really know what else to put in the question, if you need any more information please comment and I'll provide.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

心头的小情儿 2025-02-06 05:21:28

确保您安装Express类型npm install @type/express在.ts文件import> import {application}中,从'express''

您的代码看起来像这样:

import { Application } from "express";
import userController from "./userController.js"
import getController from "./getController.js"
import productController from "./productController.js"

const exportArr = [userController, getController, productController]

export default (app: Application) => {
    exportArr.forEach(controller => controller(app))
}

Make sure you install express types npm install @types/express and in your .ts file import {Application} from 'express'

Your code would look like this:

import { Application } from "express";
import userController from "./userController.js"
import getController from "./getController.js"
import productController from "./productController.js"

const exportArr = [userController, getController, productController]

export default (app: Application) => {
    exportArr.forEach(controller => controller(app))
}
原野 2025-02-06 05:21:28

尝试一下,至少在Linux上一切正常。您确定这与系统上的某些配置或BUN安装问题无关吗?

elvis@ubuntu:~/test$ bun run index.ts 
{
  "2023_11_06T20": "23:15-03:00 - IP: 2.131.246.11",
  domain: "virtu.com.br",
  owner: "Virtu Assessoria Empresarial ltda",
  ownerid: "67.643.882/0001-84",
  responsible: "Marcio Antonio Rosconi",
  country: "BR BR BR",
  ownerC: "TRA56",
  techC: "MAARO1014",
  nserver: "ns1.locaweb.com.br ns2.locaweb.com.br ns3.locaweb.com.br",
  nsstat: "20231106 AA 20231106 AA 20231106 AA",
  nslastaa: "20231106 20231106 20231106",
  created: "20051017 #2425251 20041117 20191107",
  changed: "20221018 20230920 20201005",
  expires: "20321017",
  status: "published",
  nicHdlBr: "TRA56 MAARO1014",
  person: "Talles Rodrigues Alves marcio antonio rosconi",
  eMail: "[email protected] [email protected]",
  ofQueriesAre: "domain (.br), registrant (tax ID), ticket,"
}

Gave it a try and everything works as expected on Linux at least. Are you sure it is not something to do with some config on your system or some issues with bun installation?

elvis@ubuntu:~/test$ bun run index.ts 
{
  "2023_11_06T20": "23:15-03:00 - IP: 2.131.246.11",
  domain: "virtu.com.br",
  owner: "Virtu Assessoria Empresarial ltda",
  ownerid: "67.643.882/0001-84",
  responsible: "Marcio Antonio Rosconi",
  country: "BR BR BR",
  ownerC: "TRA56",
  techC: "MAARO1014",
  nserver: "ns1.locaweb.com.br ns2.locaweb.com.br ns3.locaweb.com.br",
  nsstat: "20231106 AA 20231106 AA 20231106 AA",
  nslastaa: "20231106 20231106 20231106",
  created: "20051017 #2425251 20041117 20191107",
  changed: "20221018 20230920 20201005",
  expires: "20321017",
  status: "published",
  nicHdlBr: "TRA56 MAARO1014",
  person: "Talles Rodrigues Alves marcio antonio rosconi",
  eMail: "[email protected] [email protected]",
  ofQueriesAre: "domain (.br), registrant (tax ID), ticket,"
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文