首页 > 解决方案 > 在 cent os 7.5 sh 上为 vue.js 运行构建:vue-cli-service:找不到命令

问题描述

我得到了 vue 命令的工作状态:

[root@example.com vue-ts-starter]# vue
Usage: vue <command> [options]

Options:
  -V, --version  output the version number
  -h, --help     output usage information

Commands:
  init           generate a new project from a template
  list           list available official templates
  build          prototype a new project
  create         (for v3 warning only)
  help [cmd]     display help for [cmd]

在尝试:

vue build

我有:

我们正在精简 vue-cli 以通过删除vue build命令来优化初始安装。查看提供相同功能的Poi ( https://github.com/egoist/poi )!

  npm run build

(在我的本地计算机上一切正常)这是错误日志:

> vue-cli-service build

sh: vue-cli-service: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! vue-ts-starter@0.1.0 build: `vue-cli-service build`
npm ERR! spawn ENOENT

标签: vue.jscentos7

解决方案


推荐阅读