Browserify 使用 require('fs-extra') 并在加载 bundle.js 时抛出 Uncaught TypeError: Object prototype may only be an Object 或 null: undefined

问题描述

这个问题只针对 fs-extra 模块。 当我尝试在 html 中加载浏览器化的 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)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)