微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

卸载浏览器同步,仍然收到错误“sh:浏览器同步:未找到命令”

如何解决卸载浏览器同步,仍然收到错误“sh:浏览器同步:未找到命令”

我已经查看了我能找到的所有可能的现有答案,但没有任何运气。

我通过以下方式卸载了浏览器同步:npm uninstall -g browser-sync --save

我在终端确认它不再通过以下方式安装: npm ls -g --depth=0 /usr/本地/lib └── npm@6.14.11

我的代码是简单的 html 测试代码,尽管我尝试的任何代码也发生了这种情况,包括来自 Wes Bos 的 CSS 课程的文件夹......:

<!DOCTYPE html>
<html lang="en">
  <head>
    <Meta charset="UTF-8" />
    <title>Testing Uninstall browserSync</title>
  </head>
  <body>
    <h1>Hello world</h1>
  </body>
</html>

当我执行 npm install(或 sudo npm install)然后 npm start 时,没有出现 node_modules 文件夹,浏览器没有打开,我收到以下错误

> gum@1.0.0 start /Users/jamiestuart
> browser-sync start --server --files "*.css,*.html,*.js"

sh: browser-sync: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! gum@1.0.0 start: `browser-sync start --server --files "*.css,*.js"`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the gum@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 

请如果有人能提供一些令人惊奇的见解!我也不知道gum@1.0.0 是什么,并尝试卸载它,认为这可能会解决问题,但还是没有运气。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。