Meteor 节点错误:无法解析某些模块:“node:stream/web”

问题描述 投票:0回答:1

流星版本:2.16 节点版本:18.15.0

启动我的流星应用程序时,我收到以下错误行,但不确定原因:

(node:6749) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6749) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:6749) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
                                              
Unable to resolve some modules:

  "node:stream/web" in /Users/patel/meteor_workspace/kcon_app_v2/node_modules/node-fetch/node_modules/fetch-blob/streams.cjs (web.browser)
  "worker_threads" in /Users/patel/meteor_workspace/kcon_app_v2/node_modules/node-domexception/index.js (web.browser)
                                              
If you notice problems related to these missing modules, consider running:
                                              
  meteor npm install --save node:stream meteor-node-stubs
                                              
                                              
Unable to resolve some modules:

  "node:stream/web" in /Users/patel/meteor_workspace/kcon_app_v2/node_modules/node-fetch/node_modules/fetch-blob/streams.cjs (web.browser.legacy)
  "worker_threads" in /Users/patel/meteor_workspace/kcon_app_v2/node_modules/node-domexception/index.js (web.browser.legacy)
                                              
If you notice problems related to these missing modules, consider running:
                                              
  meteor npm install --save node:stream meteor-node-stubs

即使我尝试运行“meteor npm install --save node:streammeteor-node-stubs”,但仍然收到此错误。但这并不会阻止应用程序的执行。应用程序的其他部分运行良好,没有任何问题。

node.js meteor
1个回答
0
投票

Meteor 在内部管理其 Node 和 NPM 版本。 Meteor 2.16 在节点 14 上运行。Meteor 3 在节点 20 上运行。

确保按照说明安装了meteor-node-stubs 软件包。至于流,导入时尝试不带

node:
前缀。

确保您依赖的任何其他软件包都支持 Node 14,或者最好将您的应用程序升级到 Meteor 3.0.1(如果此时可能),以便您可以拥有所有软件包都应支持的 Node 20。

© www.soinside.com 2019 - 2024. All rights reserved.