【问题标题】:The package at "node_modules\uuidv4\build\lib\uuidv4.js" attempted to import the Node standard library module "util"“node_modules\uuidv4\build\lib\uuidv4.js”的包试图导入Node标准库模块“util”
【发布时间】:2021-05-05 10:25:38
【问题描述】:

当我尝试在 Android 手机上运行 react-native 应用程序时遇到错误

构建 JavaScript 包失败。 “node_modules\uuidv4\build\lib\uuidv4.js”中的包尝试 导入 Node 标准库模块“util”。 它失败了,因为本机 React 运行时不包含 节点标准库。阅读更多 https://docs.expo.io/workflow/using-libraries/#using-third-party-libraries

但它在网络上运行(网络浏览器)....帮我解决这个错误

【问题讨论】:

    标签: node.js react-native


    【解决方案1】:

    在您的终端上尝试并重新启动您的 VS Code 或文本编辑器

    npm install util
    

    【讨论】:

      猜你喜欢
      • 2021-04-15
      • 1970-01-01
      • 2019-11-22
      • 2019-09-13
      • 2020-03-24
      • 2020-10-26
      • 2021-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多