安装vite时未捕获类型错误:对象原型只能是对象或为null:未定义

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

我已经更改了react-script并安装了vite,但我有一个问题,它显示白页

inherits_browser.js:5 Uncaught TypeError: Object prototype may only be an Object or null: undefined
at Function.create (<anonymous>)
at Object.inherits (inherits_browser.js:5:29)
at node_modules/jws/lib/data-stream.js (data-stream.js:39:6)
at __require2 (chunk-WGAPYIUP.js?v=4dc5655b:19:50)
at node_modules/jws/lib/sign-stream.js (sign-stream.js:3:18)
at __require2 (chunk-WGAPYIUP.js?v=4dc5655b:19:50)
at node_modules/jws/index.js (index.js:2:18)
at __require2 (chunk-WGAPYIUP.js?v=4dc5655b:19:50)
at node_modules/jsonwebtoken/decode.js (decode.js:1:11)
at __require2 (chunk-WGAPYIUP.js?v=4dc5655b:19:50)

enter image description here

module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
  constructor: {
    value: ctor,
    enumerable: false,
    writable: true,
    configurable: true
  }
});

enter image description here

我不知道这是错误。请帮我检查一下这个问题

我想运行我的项目

reactjs vite
1个回答
0
投票

你定义了superCtor吗?它看起来像因为你想使用 superCtor 原型但它从未定义。

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