cordova运行android - Uncaught TypeError:无法读取未定义的属性'prototype'

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

cordova run android显示白色屏幕,在webview的chrome检查中出现以下错误

Uncaught TypeError: Cannot read property 'prototype' of undefined

    at inherits (inherits_browser.js:5)
    at Object.<anonymous> (parser_stream.js:27)
    at __webpack_require__ (bootstrap 9ec8f0a9e2870d9ff7e5:587)
    at fn (bootstrap 9ec8f0a9e2870d9ff7e5:111)
    at Object.<anonymous> (index.js:41)
    at __webpack_require__ (bootstrap 9ec8f0a9e2870d9ff7e5:587)
    at fn (bootstrap 9ec8f0a9e2870d9ff7e5:111)
    at Object.<anonymous> (index.js:3)
    at __webpack_require__ (bootstrap 9ec8f0a9e2870d9ff7e5:587)
    at fn (bootstrap 9ec8f0a9e2870d9ff7e5:111)

当前系统属性

$ node -v
v8.12.0

$ cordova -v
7.1.0

$ monaca -v
2.7.4

$ npm -v
6.4.1

$ gradle -v
Gradle 4.1

Screenshot where the code break on undefined

cordova uncaught-typeerror
1个回答
0
投票

从我在屏幕截图中看到的问题可能是“superCtor.prototype”调试您的代码并在此时检查superCtor上的值。如果未定义,则返回到初始化superCtor的位置,并确保它在那里获得有效值。

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