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

官方doc中,作为 npm 包使用的js代码执行报错(NOROUTE) #15151

Closed
1 task done
lunat1cccc opened this issue Apr 8, 2024 · 4 comments
Closed
1 task done
Labels
RSS bug Something isn't working

Comments

@lunat1cccc
Copy link

lunat1cccc commented Apr 8, 2024

路由地址

null

完整路由地址

null

相关文档

https://rsshub-doc.pages.dev/usage.html#bian-xie-ding-yue-yuan

预期是什么?

使用官方示例代码运行

实际发生了什么?

执行报错:
\node_modules\rsshub\lib\pkg.ts:1
import { setConfig } from '@/config';
SyntaxError: Cannot use import statement outside a module

尝试解决:
package.json中添加type:module,并改为import导入
仍旧报错:TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for d:\Test\js\RSS\node_modules\rsshub\lib\pkg.ts

类似的issue:有一个类似的但是他是部署到vercel的时候报错,和安装rsshub包使用并不类似。

部署

RSSHub 演示 (https://rsshub.app)

部署相关信息

Windows:Node.js v20.10.0

额外信息

null

这不是重复的 issue

  • 我已经搜索了 现有 issue,以确保该错误尚未被报告。
@lunat1cccc lunat1cccc added the RSS bug Something isn't working label Apr 8, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

Searching for maintainers:
  • null: Route not found

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake.
如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

@github-actions github-actions bot closed this as completed Apr 8, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

Searching for maintainers:
  • null: Route not found

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake.
如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

@github-actions github-actions bot reopened this Apr 8, 2024
@github-actions github-actions bot closed this as completed Apr 8, 2024
@lunat1cccc lunat1cccc changed the title 官方doc中,作为 npm 包使用的js代码执行报错 官方doc中,作为 npm 包使用的js代码执行报错(NOROUTE) Apr 8, 2024
@github-actions github-actions bot reopened this Apr 8, 2024
Copy link
Contributor

github-actions bot commented Apr 8, 2024

Searching for maintainers:
  • null: Route not found

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake.
如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

@github-actions github-actions bot closed this as completed Apr 8, 2024
@lunat1cccc
Copy link
Author

NOROUTE 这个错误和路由无关

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RSS bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant