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 install vue environment offline

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will give you a detailed explanation on how to install the vue environment offline. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Offline installation of vue environment method: 1, cmd run command "npm config get cache"; 2, intranet computer installation nodejs;3, intranet global installation directory; 4, intranet command installation offline dependency package; 5, copy vue project to intranet; 6, check whether the global command is normal.

This article operating environment: windows7 system, vue/cli version 3.12.1, DELL G3 computer.

How to install vue environment offline?

Set up an offline vue environment and run the project steps

1. Copy the local (npm-cache cache directory on public network computers)

Cmd runs the command npm config get cache

2. Install nodejs on intranet computers

You can copy the U disk or CD to the intranet computer for installation.

3. Private network global installation directory

Run npm root-g on the command line to view the global installation directory; then copy the npm-cache cache directory to the npm directory (an error will be reported if you put it at the same level)

4. Install offline dependency package with intranet command

Npm install-- cache. / npm-cache-- optional-- cache-min 9999999999-- shrinkwrap false yarnnpm install-- cache. / npm-cache-- optional-- cache-min 99999999999-- shrinkwrap false webpacknpm install-- cache. / npm-cache-- optional-- cache-min 99999999999-- shrinkwrap false webpack-clinpm install-- cache. / npm-cache-- optional-- cache-min 999999999-- shrinkwrap false @ vue/cli@3

5. Copy the vue project to the private network, including the node_modules folder (note that mac and windows dependent packages cannot be shared)

6. Check whether the global command is normal npm list-global-- debth 0

Normal

Abnormal

Solution:

The npm root-g command finds the npm folder

Delete the node_modules folder at the same level as the npm directory

Put the npm-cache folder in the npm directory

Run the project yarn run serve

This is the end of the article on "how to install the vue environment offline". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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