javascript - Browserify 使用 require('fs-extra') 并在加载 bundle.js 时抛出 Uncaught TypeError: Object prototype may only be an Object or null: undefined
问题描述
此问题仅特定于 fs-extra 模块。当我尝试在 html 中加载 browserified bundle.js 时,会出现错误。
bundle.js:2483 Uncaught TypeError: Object prototype may only be an Object or null: undefined
at Function.setPrototypeOf (<anonymous>)
at bundle.js:2483
at patch (bundle.js:2485)
at patch (bundle.js:1949)
at Object.<anonymous> (bundle.js:1941)
at Object.<anonymous> (bundle.js:2220)
at Object.31../clone.js (bundle.js:2220)
at o (bundle.js:1)
at bundle.js:1
at Object.14../copy (bundle.js:803)
解决方案
推荐阅读
- javascript - 在 2 个不同的画布中复制粘贴
- ios - iOS:这个 NSPersistentStoreCoordinator 没有持久存储 => 如何检查应用程序中的 sqlite 数据库是否与模型对应?
- codenameone - 如何将多个浏览组件放在一个代号容器中?
- ios - iOS中的本地通知(目标C)
- mojolicious - 带有正则表达式的 Mojolicious Lite 路由
- java - 无法在 android studio 中解析导入 javafx.util.Pair
- node.js - 在graphql nodejs express app中调用方法时出错
- sql - 使用 CTE 创建数据子集
- devops - 升级后地图中的 zabbix-fronend-php 出现问题
- ios - 如何将 AutoLayout 约束的常量设置为超级视图的百分比?