【问题标题】:vue js app yarn serve is failing with exit code 1.?vue js app yarn serve 失败,退出代码为 1。?
【发布时间】:2019-02-08 20:19:42
【问题描述】:

我正在使用 vuejs 构建 Web 应用程序的前端。直到昨天我的应用程序运行良好,但今天突然yarn serve 命令抛出错误。

 Error: watch /home/abhey/Documents/abhey/astrix/astrix_final_project/ecommerceFrontend/public ENOSPC
    at _errnoException (util.js:1022:11)
    at FSWatcher.start (fs.js:1382:19)
    at Object.fs.watch (fs.js:1408:11)
    at createFsWatchInstance (/home/abhey/Documents/abhey/astrix/astrix_final_project/ecommerceFrontend/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/abhey/Documents/abhey/astrix/astrix_final_project/ecommerceFrontend/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/abhey/Documents/abhey/astrix/astrix_final_project/ecommerceFrontend/node_modules/chokidar/lib/nodefs-handler.js:232:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/abhey/Documents/abhey/astrix/astrix_final_project/ecommerceFrontend/node_modules/chokidar/lib/nodefs-handler.js:414:19)
    at FSWatcher.<anonymous> (/home/abhey/Documents/abhey/astrix/astrix_final_project/ecommerceFrontend/node_modules/chokidar/lib/nodefs-handler.js:462:19)
    at FSWatcher.<anonymous> (/home/abhey/Documents/abhey/astrix/astrix_final_project/ecommerceFrontend/node_modules/chokidar/lib/nodefs-handler.js:467:16)
    at FSReqWrap.oncomplete (fs.js:153:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我确实尝试查看文档,但没有用。我也尝试过完全开始一个新项目,但没有任何帮助。有什么建议?如果有任何用处,我将使用 Linux Mint 19 作为我的操作系统。

【问题讨论】:

  • ENOSPC 表示驱动器上没有剩余空间 - 磁盘空间不足吗?
  • 不,我的磁盘只增加了 30%,它是唯一与我的 chrome 浏览器一起运行的应用程序......
  • 请看@Majed Fayazi 的回答:stackoverflow.com/a/49148240

标签: vue.js node-modules yarnpkg


【解决方案1】:

嗯,我在使用 npm 时遇到了同样的问题。 您可以尝试清理 npm 缓存删除节点模块文件夹并重新安装依赖项在您的终端尝试此代码。

    cd ~
    sudo rm -rf .npm 
    cd <package folder where node module exist> 
    npm cache clean 
    rm -rf node_modules
    npm install

用 yarn 试试同样的逻辑,它会解决你的问题。

【讨论】:

    猜你喜欢
    • 2022-01-11
    • 2017-07-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-11
    • 2020-07-16
    • 1970-01-01
    相关资源
    最近更新 更多