Vue-cli creates vue3.0 project steps

First look at the blogger's node.js and npm versions:

2. Open cmd as an administrator and create two empty folders node_global and node_cache in the decompressed folder;

And configure it in cmd:

5. Enter vue -V, the error 'vue' is not an internal command, nor an executable program; at this time

6. Input

return result

7. Then enter the Taobao mirror npm install -g cnpm --registry= http://registry.npm.taobao.org

 

8. Check whether cnpm is built successfully

Prove success.

If you enter cnpm -v after installation and it still prompts that 'cnpm' is not an internal command, then find the newly installed cnpm file according to the installation path prompted on the interface, usually in the C://User/XXX/AppData/cnpm folder, copy The entire cnpm folder to the node_modules file and the npm file in the Node.js file are placed in the same directory

Then find the following two files

copy it to this directory

 Then it will work.

9. Enter cnpm install -g @vue/cli

Install scaffolding.

success.

10. Then enter vue -V

success

11. Enter vue create + (project name), and press Enter to create the project.

Notice:

The blogger here also found it out after untold hardships, and encountered many strange problems in it. Finally, it was successful to reinstall node.js and vscode after completely uninstalling it. If it still doesn't work, I suggest uninstalling and reinstalling.

Guess you like

Origin blog.csdn.net/CJB2020818/article/details/120651195