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

【提问】此 TS 项目该如何运行、部署? #2

Closed
AndyNull opened this issue Oct 17, 2023 · 7 comments
Closed

【提问】此 TS 项目该如何运行、部署? #2

AndyNull opened this issue Oct 17, 2023 · 7 comments

Comments

@AndyNull
Copy link

大佬们别喷,主要确实不会,哈哈
使用ts-node main.ts直接运行报错如下:

/usr/local/lib/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
main.ts:1:29 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.

1 import { Application } from './deps.ts'
~~~~~~~~~~~
main.ts:2:20 - error TS5097: An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.

@vikiboss
Copy link
Owner

这是一个 deno 项目,不是常规的 node 项目,它们的异同参考 deno 官网。

你可以使用 deno 本地开发,或者使用 deno deploy 的部署服务自行部署。

@vikiboss vikiboss pinned this issue Oct 17, 2023
@AndyNull
Copy link
Author

好叻,谢谢,我去看看,

@AndyNull
Copy link
Author

行了,刚刚找了个arm64的deno装上能跑了,哈哈

@BerBai
Copy link

BerBai commented Mar 28, 2024

deno deploy部署上了,但绑定域名一直解析不通过,dns用的cloudflare。

@vikiboss
Copy link
Owner

deno deploy部署上了,但绑定域名一直解析不通过,dns用的cloudflare。

按照 deno deploy 的自定义域名指南,加上需要的 DNS 解析,一会儿就好了吧,具体操作:

  1. 到 deno 项目设置页,添加域名
  2. 点击 setup 按钮查看要加哪些解析,比如:
image
  1. 到 cloudflare 添加对应的解析,三个都要
  2. 过不到一分钟,应该就添加好了

@vikiboss
Copy link
Owner

image

@BerBai
Copy link

BerBai commented Apr 1, 2024

image

感谢,没有使用dns解析。已经解决了

@vikiboss vikiboss changed the title 啊?敢问一下ts咋运行啊?我编译报错 【提问】此 TS 项目该如何运行、部署? Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants