Laravel 第四张学习——优化页面(1)

问题以及解决方案

执行 yarn add cross-env 报错 :
   error An unexpected error occurred: "EIO: i/o error, symlink '../../../parser/bin/babel-parser.js' -> '/home/vagrant/Code/weibo/node_modules/@babel/core/node_modules/.bin/parser'".
解决方案:
   执行 yarn add cross-env --save --no-bin-links

再次执行 npm run dev 报错:
  sh: 1: cross-env: not found
  npm ERR! file sh
  npm ERR! code ELIFECYCLE
  npm ERR! errno ENOENT
  npm ERR! syscall spawn
  npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
  npm ERR! spawn ENOENT
  npm ERR!
  npm ERR! Failed at the @ development 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! /home/vagrant/.npm/_logs/2019-11-25T09_47_21_201Z-debug.log
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! @ dev: npm run development
  npm ERR! Exit status 1
  npm ERR!
  npm ERR! Failed at the @ dev 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:
解决方案:去掉 package.json里面的 cross-env

再次执行 npm run dev 未报错,提示如下:
  Additional dependencies must be installed. This will only take a moment.
  Running: npm install vue-template-compiler --save-dev --production=false
尝试解决方案:
  按照提示执行 npm install vue-template-compiler --save-dev --production=false
     再次报错:
       npm ERR! path /home/vagrant/Code/weibo/node_modules/.vue-template-compiler.DELETE/.nfs000000000001146200000001
       npm ERR! code EBUSY
       npm ERR! errno -16
       npm ERR! syscall unlink
       npm ERR! EBUSY: resource busy or locked, unlink '/home/vagrant/Code/weibo/node_modules/.vue-template-compiler.DELETE/.nfs000000000001146200000001'
       npm ERR! A complete log of this run can be found in:
       npm ERR! /home/vagrant/.npm/_logs/2019-11-25T09_56_15_438Z-debug.log
       由于技术盲点,此错误没有解决;还望看到文章的大神帮忙一下;万般无奈之下,继续执行 npm run dev,竟然成功了;

本作品采用《CC 协议》,转载必须注明作者和本文链接
附言 1  ·  4年前

执行 npm run watch-poll 的时候如果提示 “Running: yarn add vue-template-compiler --dev --production=false Running: yarn add vue-template-compiler --dev --production=false“,就使用 yarn add vue-template-compiler --dev --production=false --no-bin-links 命令安装。

附言 2  ·  4年前

95% emitting unnamed compat pluginError: EIO: i/o error, close;出现这个问题是,可以去掉Homestead.yaml文件的 type: "nfs"

gongmeng
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
《G01 Go 实战入门》
从零开始带你一步步开发一个 Go 博客项目,让你在最短的时间内学会使用 Go 进行编码。项目结构很大程度上参考了 Laravel。
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!