如何卸载浏览器同步

问题描述

我尝试卸载浏览器同步,但它根本不起作用。

我已经尝试过多次并且已经看过这些问题:

我尝试添加 -g,它只是说它是“最新的”...

>npm uninstall browser-sync
npm ERR! code EJSONPARSE
npm ERR! file C:\Users\justi\OneDrive\Documents\GitHub\triangle-calc\package.json
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected token } in JSON at position 316 while parsing near '...les.css --watch",npm ERR! JSON.parse   },npm ERR! JSON.parse   "keywords": [],...'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON,not just JavaScript.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\justi\AppData\Roaming\npm-cache\_logs\2020-12-28T01_44_57_830Z-debug.log

>npm uninstall browser-sync -g
up to date in 0.063s

我以前在卸载其他任何东西时都没有遇到过这个问题。我希望在这里张贴有人会很快发现我的愚蠢错误。提前致谢。

解决方法

我的 package.json 中有错误(诚然,正如输出所说)。这是一个额外的逗号(显然在 JS 中有效,但在 JSON 中无效)。保留它以防它帮助其他人尝试卸载软件包。