You need to install the Vue CLI Service before you can run the binary. Try installing at the project-level as opposed to globally instead.
在运行二进制文件之前,您需要安装 Vue CLI 服务。尝试在项目级安装,而不是全局安装。
The 404 is a "feature" of npx
whereby it attempts to download (then execute) missing packages unless the --no-install
flag is passed. The reason it cannot find vue-cli-service
is because that particular package doesn't exist in the registry.
404是 npx 的一个“特性”,它试图下载(然后执行)丢失的包,除非传递 -- no-install 标志。之所以找不到 vue-cli-service,是因为这个特定的包在注册表中不存在。
Note the package name for Vue CLI Service is @vue/cli-service
which differs from the name of the binary it installs. Let's hope no one is ever able to register a module called vue-cli-service
for security reasons. Because if they do you'd've downloaded and run their module instead.
请注意,Vue CLI Service 的包名为@Vue/CLI-Service,这与它所安装的二进制文件的名称不同。出于安全原因,希望没有人能够注册一个名为 vue-cli-service 的模块。因为如果他们这么做了,你就会下载并运行他们的模块。
复制以下指令运行即可
npm i @vue/cli-service