Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to run someone else's vue project

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

In this issue, the editor will bring you about how to run other people's vue projects. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Operation method: 1, delete the "node_modules" folder and "package-lock.json"; 2, open the cmd window, use the cd command to enter the project directory; 3, clear the npm cache; 4, reinstall the dependency; 5, package the project; 6, execute the "npm run dev" named run project.

The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.

The way to run someone else's vue project:

At work, we often have to take over other people's vue projects, so how can we run after we get other people's vue projects from svn and git?

1. Delete the "node_modules" folder in the project, which is the dependent package of the vue project. However, due to the "node_modules" folder is too large, generally will not be packaged to upload to svn, git, so there is no need to delete this folder.

2. Delete package-lock.json. Package-lock.json records the tree structure of the entire node_moudles folder and the download address of the module, but it is generated based on the npm version library of the project author. If you do not delete this dependent file, it is prone to errors caused by differences in npm versions.

3, then open cmd,cd to the project directory, specific operation: first enter the drive letter, and then use the cd command to switch the directory, do not understand the self-walking Niang.

4. Run npm clean cache-f to clear the npm cache, and when npm has cache, the installation dependence is often unsuccessful. Once this problem occurs, the error message is perfect, but it cannot be solved according to the error message one by one, and the reason cannot be found.

5. Run npm install and reinstall the dependency.

Note: it is recommended that you do not install cnpm. There are all kinds of weird bug. The slow download speed of npm can be solved by doing the following.

Npm install-- registry= https://registry.npm.taobao.org

Steps 6 and 7 may cause the version problem to become boldface directly. Note that there are & errors in the path.

6. Run npm run build packaging.

7. After running npm run dev, the project runs successfully.

Run the command npm run dev and npm ERR appears! Missing script: error of dev

This is due to a problem with the vue version, using npm run serve to run the project

The above is the editor for you to share how to run other people's vue project, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report