“node_modules/express/lib/express.js”中的包尝试导入 Node 标准库模块“events”

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

我收到此错误“构建 JavaScript 包失败。 “node_modules/express/lib/express.js”处的包尝试导入 Node 标准库模块“events”。它失败了,因为本机 React 运行时不包含 Node 标准库。欲了解更多信息,请访问 https://docs.expo.io/workflow/using-libraries/#using-third-party-libraries"

我尝试安装几个包含事件的依赖项,但它们都不起作用,请帮忙

javascript node.js dependency-injection error-handling
1个回答
0
投票

当我尝试使用 uri 来反应本机图像选择器时,我已将包导入到我正在处理的当前文件中

从“express”导入{urlencoded};

当我删除它时,它工作得很好。检查您的进口,如果您有任何来自快递的进口,请将其删除

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