【问题标题】:Running Vapor from Homestead failds从 Homestead 运行 Vapor 失败
【发布时间】:2019-10-23 22:10:44
【问题描述】:

我在一个全新的 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

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

【问题讨论】:

  • 你注册了蒸汽账户吗?

标签: laravel homestead laravel-vapor


【解决方案1】:

您没有指定您的主机操作系统是什么,但我假设它是 Windows,当您运行“vagrant up”时,您是否以管理员身份执行此操作?

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

【讨论】:

    【解决方案2】:

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

    <project directory>: npm install
    

    这将创建必要的文件。

    【讨论】:

      猜你喜欢
      • 2020-11-20
      • 2021-02-27
      • 1970-01-01
      • 2016-12-01
      • 2017-05-24
      • 2021-06-24
      • 2013-06-02
      • 2014-11-15
      • 2021-03-20
      相关资源
      最近更新 更多