我已经从git hub(https://github.com/jimmerioles/progressive-weather-app)克隆了vue应用程序,以实现jenkins中的自动化部署。在做之前,我要检查我的ubuntu计算机(GCP vm)。在那里,我已经安装了java,nodejs,npm和vuecli。当我执行命令“ npm run build”时,出现以下错误。我尝试重新安装vuecli,nodejs和npm,仍然出现相同的错误。请让我知道如何解决此问题。
npm版本为“ 6.2.0”,nodejs版本为“ v14.3.0”,而vuecli是最新版本。
root@instance-2:~/weather/src# npm run build
> PWeatherApp@0.1.0 build /root/weather
> vue-cli-service build
sh: 1: vue-cli-service: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! PWeatherApp@0.1.0 build: `vue-cli-service build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the PWeatherApp@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-23T18_32_20_092Z-debug.log
答案 0 :(得分:0)
它可以帮助你:
npm install -g @vue/cli
# OR
yarn global add @vue/cli