我安装了 vue-cli 3。我尝试使用 vue create 创建一个 vue 应用程序,但出现 no such file 错误。
~$ vue create hello-world
bash: /usr/local/bin/vue: No such file or directory
安装 vue/cli3
yarn global v0.15.1
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed @vue/[email protected] with binaries:
- vue
Done in 1.69s.
我希望这对某人有帮助,但同样的事情也发生在我身上,我只需在尝试使用它之前重新启动终端即可。我的意思是,安装 vue-cli 之后npm i -g @vue/cli
重新启动终端或使用以下内容更新源:source ~/.bash_profile
(或者只是重新启动终端,更容易),这样您的个人资料中的路径就会更新:)。这为我解决了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)