vue js应用程序yarn失败,退出代码为1。

时间:2018-09-03 19:40:19

标签: vue.js node-modules yarnpkg

我正在使用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用作操作系统。

1 个答案:

答案 0 :(得分:2)

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

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

尝试用毛线进行相同的逻辑将解决您的问题。