Lite-server 无法启动,原因是“Unexpected token ...”

问题描述

我是 typescript 的新手并按照教程使用 lite-server,但是当我使用 npm start 时,我收到以下错误

      D:\web_demo\tsTest\node_modules\micromatch\index.js:44
  let isMatch = picomatch(String(patterns[i]),{ ...options,onResult },true);
                                                ^^^
SyntaxError: Unexpected token ...
  at Object.exports.runInThisContext (vm.js:53:16)
  at Object.Module._extensions..js (module.js:550:10)
  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> (D:\web_demo\tsTest\node_modules\browser-sync\dist\public\stream.js:3:18)
  at Module._compile (module.js:541:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! aa@1.0.0 start: `lite-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the aa@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\zouxing\AppData\Roaming\npm-cache\_logs\2021-06-24T07_11_23_793Z-debug.log

我的 npm 版本是 4.6.1,我的 node 版本是 6.2.0

我的 package.json 简单而正确:

{
"name": "aa","version": "1.0.0","description": "","main": "test.js","scripts": {
  "test": "echo \"Error: no test specified\" && exit 1","start":"lite-server"
},"author": "","license": "ISC","dependencies": {

},"devDependencies": {
  "lite-server": "^2.6.1"
}
}

怎么了?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...