从Homestead运行蒸汽失败

时间:2019-10-23 22:10:44

标签: laravel homestead laravel-vapor

我在全新的Laravel中安装了Vapor。当我尝试运行“蒸气部署生产”时,出现此错误:

Running Command: npm ci && npm run prod && rm -rf node_modules
npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2019-10-23T21_24_09_128Z-debug.log

In Process.php line 254:

  The command "npm ci && npm run prod && rm -rf node_modules" failed.

  Exit Code: 1(General error)

  Working directory: /home/vagrant/code/sales2/.vapor/build/app

  Output:
  ================


  Error Output:
  ================
  npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVers
  ion >= 1. Run an install with npm@5 or later to generate it, then try again.

  npm ERR! A complete log of this run can be found in:
  npm ERR!     /home/vagrant/.npm/_logs/2019-10-23T21_24_09_128Z-debug.log

我成功安装了蒸气。创建了一个新项目,并将域设置保留为默认设置。

2 个答案:

答案 0 :(得分:0)

您没有指定主机操作系统是什么,但我认为它是Windows,当您“无所事事”运行时,您是否以管理员身份这样做?

也就是说,这是npm而不是Vapor的问题。我会在您的游民控制台中运行“ npm ci && npm run prod && rm -rf node_modules”命令,并从那里进行故障排除。

答案 1 :(得分:0)

您可能没有为此项目配置节点包管理器。从您的计算机而不是宅基地(如果您正在使用)运行此命令

<project directory>: npm install

这将创建必要的文件。