我在一辆全新的Laravel up上安装了Vapor。当我尝试运行'vapor deploy production‘时,我得到这个错误:
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我成功地安装了蒸气。创建了一个新项目并将域设置保留为默认设置。
发布于 2019-11-07 00:05:17
你没有指定你的主机操作系统是什么,但我假设它是windows,当你运行“流浪”时,你是以管理员的身份运行的吗?
也就是说,这是npm的问题,而不是Vapor的问题。我运行了"npm ci && npm run prod && rm -rf node_modules“命令ssh'd到你的vagrant控制台并从那里进行故障排除。
发布于 2021-05-10 12:14:47
您可能没有为此项目配置节点包管理器。从您的计算机而不是homestead (如果您正在使用)中,运行以下命令
<project directory>: npm install这将创建所需的文件。
https://stackoverflow.com/questions/58531591
复制相似问题