首页 > 解决方案 > 尝试执行“vue create”时出现“错误命令失败:npm install --loglevel 错误”

问题描述

Vue CLI v3.2.1
✨  Creating project in /home/mcaubrey511/portfolio.
  Initializing git repository...
⚙  Installing CLI plugins. This might take a while...


> yorkie@2.0.0 install /home/mcaubrey511/portfolio/node_modules/yorkie
> node bin/install.js


ERROR  command failed: npm install --loglevel error

环境信息

系统:

操作系统:Linux 4.18 Ubuntu 18.10(宇宙墨鱼)

CPU:(1) x64 Intel(R) Xeon(R) CPU @ 2.30GHz

二进制文件:

节点:10.14.1 - /usr/bin/node

npm:6.4.1 - /usr/bin/npm

npmPackages:

@vue/babel-preset-app: 3.2.0

@vue/cli-overlay:3.2.0

@vue/cli-plugin-babel: ^3.2.0 => 3.2.0

@vue/cli-plugin-eslint: ^3.2.0 => 3.2.1

@vue/cli-service: ^3.2.0 => 3.2.0

@vue/cli-shared-utils:3.2.0

@vue/component-compiler-utils: 2.3.0

@vue/preload-webpack-plugin: 1.1.0

@vue/web-component-wrapper: 1.2.0

babel-helper-vue-jsx-merge-props:2.0.3

babel-plugin-transform-vue-jsx:4.0.1

eslint-plugin-vue:4.7.1

vue-eslint-解析器:2.0.3

vue-hot-reload-api:2.3.1

Vue加载器:15.4.2

vue 样式加载器:4.1.2

vue-template-es2015-compiler: 1.6.0

npmGlobalPackages:

@vue/cli:3.2.1


知道出了什么问题或我能做些什么来让它工作吗?

标签: vue.jsvue-cli

解决方案


将我使用的机器切换到 Ubuntu 18.04 LTS 后,我不再遇到问题。我在 vue-cli存储库上提出了一个问题,似乎至少还有一个人遇到了类似的问题,但环境不同。


推荐阅读