Class extends value undefined is not a constructor or null

在执行`cnpm run build`时遇到错误,提示`Class extends value undefined is not a constructor or null`。问题可能与npm和cnpm的冲突、版本不兼容有关。通过检查webpack和webpack-cli的版本,发现可能存在的不兼容性。尝试升级webpack-cli未成功,然后根据错误提示安装`watchpack-chokidar2@latest`,最终解决了问题。
摘要由CSDN通过智能技术生成

cnpm run build 的时候报错,如下:

加载应用:voiceSpAvailable
加载应用:wechatTemplateList
 WARN  "baseUrl" option in vue.config.js is deprecated now, please use "publicPath" instead.

-  Building for production... ERROR  TypeError: Class extends value undefined is not a constructor or null
TypeError: Class extends value undefined is not a constructor or null
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous>

很郁闷,这个文件根本就不是我的啊,有半毛钱关系???

这里讲明下,最好使用 cnpm, 因为python 有个npm 。所以当你使用 npm 的时候很可能会冲

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值