执行live-server报错: Unexpected identifier

最近在研究webpack搭建react的开发环境是,在使用到live-server时报错,一头雾水,报错信息如下

G:\chenqk\app\webpack-react-project>live-server
C:\Users\chenqk\AppData\Roaming\npm\node_modules\live-server\node_modules\opn\index.js:11
const wslToWindowsPath = async path => {
                               ^^^^
SyntaxError: Unexpected identifier
    at Object.exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:513:28)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\chenqk\AppData\Roaming\npm\node_modules\live-server\index.js:11:9)
    at Module._compile (module.js:541:32)

刚出现这个错误的时候一脸懵逼,又特意在群里面问了一大堆,最后没有一个人给出答案的。后来有一段时间直接忽略了,现在要用到这个东西的时候,又碰到

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值