简体   繁体   中英

Unable to start a Vue CLI project

I'm trying to use Vue CLI. Several months ago I could use it without a problem, but when I tried the command npm install -g @vue/cli just a moment ago, I got a warning npm WARN deprecated request@2.88.2: request has been deprecated .

I tried to make a vue cli project by the command vue init webpack-simple main-page , I got an error message bash: vue: command not found and I couldn't go any futher.

While I was researching I found the following page,

https://github.com/node-gh/gh/issues/761

and found out that "This request is deprecated as of February 11th, 2020", but what I don't understand is what I should use for instead of this "deprecated request", and how to do it.

Also, in the link above there is a further link, https://github.com/request/request/issues/3143 , which presents a list of some alternatives in this kind of issue, but I don't really understand what this means. The list for example includes node-fetch , make-fetch-happen , etc. as "alternative libraries to request", but how do I find out which one is the one to be replaced with request@2.88.2: ? Also, if I find out which one is the alternative to use instead, what should I do? Just install a particular library, like npm install node-fetch ?

My OS is Windows 10, and Node.js, which is needed in order to use npm is already installed.

As far as I know, this is not a problem. You've installed vue cli 4.x and vue init is used in vue 2.x .. to make sure you have vue-cli installed run the following command

> vue --version

to create an app just run the following command.

> vue create <app_name>

then follow the cli steps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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