[GH-ISSUE #662] [BUG]worker设置中兼容性标志现在无法设置为nodejs_compat,代码部署后会报No such module "node:stream". imported from "worker.js"这个错误. #251

Closed
opened 2026-02-26 20:36:20 +03:00 by kerem · 7 comments
Owner

Originally created by @ajdre2015 on GitHub (Jun 4, 2025).
Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/662

复现步骤

Image

预期行为

兼容性标志中没出现默认的nodejs_compat,反而出现2个新的选项,然后选择(nodejs_compat_populate_process_envnodejs_compat_do_not_populate_process_env,)其中任意一个,部署代码后均报No such module "node:stream". imported from "worker.js"这个错误.

部署方式

  • cli 部署
  • [ x] 用户界面部署

浏览器环境

Originally created by @ajdre2015 on GitHub (Jun 4, 2025). Original GitHub issue: https://github.com/dreamhunter2333/cloudflare_temp_email/issues/662 ## 复现步骤 ![Image](https://github.com/user-attachments/assets/cea0c67d-1700-4a69-884e-021fa9bca8b1) ## 预期行为 兼容性标志中没出现默认的nodejs_compat,反而出现2个新的选项,然后选择(nodejs_compat_populate_process_envnodejs_compat_do_not_populate_process_env,)其中任意一个,部署代码后均报No such module "node:stream". imported from "worker.js"这个错误. ## 部署方式 - [ ] cli 部署 - [ x] 用户界面部署 ## 浏览器环境
kerem 2026-02-26 20:36:20 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@vjeson commented on GitHub (Jun 5, 2025):

同样问题,这2个随便选那个然后部署worker.js都报一样的错误, 只能选这2个,但是随便选那个,deploy报错 nodejs_compat_populate_process_env

<!-- gh-comment-id:2942680386 --> @vjeson commented on GitHub (Jun 5, 2025): 同样问题,这2个随便选那个然后部署worker.js都报一样的错误, 只能选这2个,但是随便选那个,deploy报错 nodejs_compat_populate_process_env
Author
Owner

@vjeson commented on GitHub (Jun 5, 2025):

通过cli 方式部署能部署,这个变量好像是可以写死的

<!-- gh-comment-id:2942729450 --> @vjeson commented on GitHub (Jun 5, 2025): 通过cli 方式部署能部署,这个变量好像是可以写死的
Author
Owner

@dreamhunter2333 commented on GitHub (Jun 5, 2025):

输入 nodejs_compat 直接选择即可,此处是个带提示的文本输入框

Image

<!-- gh-comment-id:2943654530 --> @dreamhunter2333 commented on GitHub (Jun 5, 2025): 输入 nodejs_compat 直接选择即可,此处是个带提示的文本输入框 ![Image](https://github.com/user-attachments/assets/1fe3349d-92ba-4555-a464-4f2054a244d7)
Author
Owner

@vjeson commented on GitHub (Jun 5, 2025):

这个迷惑性确实强,我尝试过输入,最好在文档里面特殊说明,多谢

<!-- gh-comment-id:2943929923 --> @vjeson commented on GitHub (Jun 5, 2025): 这个迷惑性确实强,我尝试过输入,最好在文档里面特殊说明,多谢
Author
Owner

@dreamhunter2333 commented on GitHub (Nov 22, 2025):

现在只能选择,还有其他解决办法吗

可以打字输入的

<!-- gh-comment-id:3566923559 --> @dreamhunter2333 commented on GitHub (Nov 22, 2025): > 现在只能选择,还有其他解决办法吗 可以打字输入的
Author
Owner

@def-WA2025 commented on GitHub (Nov 23, 2025):

现在只能选择,还有其他解决办法吗

可以打字输入的

现在只能选择(?

但是文档里找到了 link


Update:

为啥还是 Uncaught Error: No such module "node:stream". imported from "worker.js"

<!-- gh-comment-id:3567221990 --> @def-WA2025 commented on GitHub (Nov 23, 2025): > > 现在只能选择,还有其他解决办法吗 > > 可以打字输入的 现在只能选择(? 但是文档里找到了 [link](https://developers.cloudflare.com/workers/configuration/compatibility-flags/) --- Update: 为啥还是 `Uncaught Error: No such module "node:stream". imported from "worker.js"`
Author
Owner

@dreamhunter2333 commented on GitHub (Nov 23, 2025):

现在只能选择,还有其他解决办法吗

可以打字输入的

现在只能选择(?

但是文档里找到了 link


Update:

为啥还是 Uncaught Error: No such module "node:stream". imported from "worker.js"

重新部署一次最新版本呢

<!-- gh-comment-id:3568229813 --> @dreamhunter2333 commented on GitHub (Nov 23, 2025): > > > 现在只能选择,还有其他解决办法吗 > > > > 可以打字输入的 > > 现在只能选择(? > > 但是文档里找到了 [link](https://developers.cloudflare.com/workers/configuration/compatibility-flags/) > > --- > > Update: > > 为啥还是 `Uncaught Error: No such module "node:stream". imported from "worker.js"` 重新部署一次最新版本呢
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudflare_temp_email#251
No description provided.