简体   繁体   English

Linux Ubuntu 无法安装@vue/cli

[英]Unable to install @vue/cli in Linux Ubuntu

I am trying to install the Vue CLI in ubuntu (WSL), but it doesn't seem to work for some reason.我正在尝试在 ubuntu (WSL) 中安装 Vue CLI,但由于某种原因它似乎无法正常工作。 I ran the command yarn add global @vue/cli , and I also tried with npm install @vue/cli --global .我运行了命令yarn add global @vue/cli ,我还尝试了npm install @vue/cli --global The commands run as though they were successfull, but as soon as I run vue --version , it throws command vue not found .这些命令运行起来就好像它们成功了一样,但是一旦我运行vue --version ,它就会抛出command vue not found Any ideas?有任何想法吗?

Solved, (partly) after a lot of time.经过很多时间(部分)解决了。 I went with the npm installation and it worked out of the box, To use yarn.我使用了 npm 安装,它开箱即用,使用纱线。 add the following to your ~/:bashrc:将以下内容添加到您的 ~/:bashrc 中:

export PATH="$PATH:$(yarn global bin)"

I am trying to install the Vue CLI in ubuntu (WSL), but it doesn't seem to work for some reason.我正在尝试在 ubuntu (WSL) 中安装 Vue CLI,但由于某种原因它似乎不起作用。 I ran the command yarn add global @vue/cli , and I also tried with npm install @vue/cli --global .我运行了命令yarn add global @vue/cli ,还尝试了npm install @vue/cli --global The commands run as though they were successfull, but as soon as I run vue --version , it throws command vue not found .这些命令就像它们成功一样运行,但是一旦我运行vue --version ,它就会抛出command vue not found Any ideas?有任何想法吗?

I am trying to install the Vue CLI in ubuntu (WSL), but it doesn't seem to work for some reason.我正在尝试在 ubuntu (WSL) 中安装 Vue CLI,但由于某种原因它似乎不起作用。 I ran the command yarn add global @vue/cli , and I also tried with npm install @vue/cli --global .我运行了命令yarn add global @vue/cli ,还尝试了npm install @vue/cli --global The commands run as though they were successfull, but as soon as I run vue --version , it throws command vue not found .这些命令就像它们成功一样运行,但是一旦我运行vue --version ,它就会抛出command vue not found Any ideas?有任何想法吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM