gpt4 book ai didi

javascript - karma 运行问题:Cannot read property 'prototype' of undefined

转载 作者:行者123 更新时间:2023-11-29 20:58:09 25 4
gpt4 key购买 nike

我在我的系统中安装了 Karma,当我运行脚本时我遇到了问题。

C:\angularjs1-master\Ch 02\sp-blogger\scripts>test.bat
C:\angularjs1-master\Ch 02\sp-blogger\node_modules\policyfile\lib\server.js:254
Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){
^

TypeError: Cannot read property 'prototype' of undefined
at Object.<anonymous> (C:\angularjs1-master\Ch 02\sp-blogger\node_modules\policyfile\lib\server.js:254:34)

无法理解这里的错误。如果需要添加任何依赖项或者我需要做任何其他事情,请告诉我。

最佳答案

因此我们无法升级使用它的组件,我们不得不降级我们的 NodeJS 版本以运行这些旧的遗留测试。

我认为 EventEmitter.prototype 在 Node 版本 7 或 8 中被删除了。我们回到 6,它起作用了。

关于javascript - karma 运行问题:Cannot read property 'prototype' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48203930/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com