search
HomeWeb Front-endJS TutorialSharing examples of solutions to error 4058 when installing vue-cli

本文主要介绍了安装vue-cli报错 -4058 的解决方法,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧,希望能帮助到大家。

本人在安装vue脚手架时报这样的错,我访问了漫山遍野还是没找到答案,有人叫我用cnpm安装,但是cnpm安装的vue有好多坑在里面:

npm WARN checkPermissions Missing write access to C:\Users\liuyg\AppData\Roaming\npm\node_modules\vue-cli\node_modules\cliui\node_modules\wordwrap
npm ERR! path C:\Users\liuyg\AppData\Roaming\npm\node_modules\vue-cli\node_modules\cliui\node_modules\wordwrap
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'C:\Users\liuyg\AppData\Roaming\npm\node_modules\vue-cli\node_modules\cliui\node_modules\wordwrap'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!   C:\Users\liuyg\AppData\Roaming\npm-cache\_logs\2017-10-18T14_34_23_721Z-debug.log


于是我在继续翻贴发红包,终于找到解决方案了,貌似是网络代理问题。

换一个npm安装源就好了,具体方法如下:

1.通过config命令

npm config set registry https://registry.npm.taobao.org

npm info underscore (如果上面配置正确这个命令会有字符串response)


2.命令行指定

npm --registry https://registry.npm.taobao.org info underscore

然后再安装就好了


相关推荐:

vue-cli 自定义指令directive 添加验证滑块详解

vue-cli项目中使用mockjs详解

实例详解vue-cli优化的webpack配置

The above is the detailed content of Sharing examples of solutions to error 4058 when installing vue-cli. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
golang 报错:“undeclared name…” 如何解决?golang 报错:“undeclared name…” 如何解决?Jun 24, 2023 pm 03:31 PM

Golang(Go编程语言)是一种基于C语言的编程语言,被广泛用于Web开发、网络编程、操作系统等领域。然而,在编写Golang程序时经常会遇到一个常见的问题,就是“undeclaredname”(未声明名称)错误。下面将介绍如何解决这个问题。了解错误信息在编译和运行Golang程序时,如果遇到了未声明名称错误,会在控制台输出相应的错误信

Java中的ClassNotFoundException——找不到类要怎么解决?Java中的ClassNotFoundException——找不到类要怎么解决?Jun 25, 2023 am 08:30 AM

Java中的ClassNotFoundException是一种常见的编译错误。当我们尝试使用Java虚拟机(JVM)加载某个类时,如果JVM找不到该类,就会抛出ClassNotFoundException。这个错误可能出现在程序运行时,也可能出现在编译时。在本文中,我们将讨论什么是ClassNotFoundException,它为什么会发生以及如何解决它。C

golang 编译错误:"undefined: json.Marshal" 如何解决?golang 编译错误:"undefined: json.Marshal" 如何解决?Jun 24, 2023 pm 03:24 PM

Go语言是一门越来越受欢迎的编程语言,它的简洁、高效、易于编写的特点已经被越来越多的开发者所认可。而在Go语言开发中,遇到编译错误是不可避免的。其中一个常见的错误就是“undefined:json.Marshal”。这个错误通常发生在你使用了Go标准库的“encoding/json”包时,编译器提示找不到“json.Marshal”的定义。这个问题的根本原

Java错误:JDBC错误,如何解决和避免Java错误:JDBC错误,如何解决和避免Jun 24, 2023 pm 02:40 PM

随着Java的广泛应用,Java程序在连接数据库时经常会出现JDBC错误。JDBC(JavaDatabaseConnectivity)是Java中用于连接数据库的编程接口,因此,JDBC错误是在Java程序与数据库交互时遇到的一种错误。下面将介绍一些最常见的JDBC错误及如何解决和避免它们。ClassNotFoundException这是最常见的JDBC

golang 报错:“undefined variable or function” 如何解决?golang 报错:“undefined variable or function” 如何解决?Jun 24, 2023 pm 05:18 PM

Go语言作为一门快速发展的编程语言,被广泛应用于各种项目和领域。然而,在使用golang编写程序时,你有可能会遇到一些报错,其中一个常见的报错是“undefinedvariableorfunction”。那么,这个错误是什么意思?它是如何产生的?又该如何解决呢?本文将会对这些问题进行探讨。首先,我们需要了解一些基本概念。在golang中,变量和函数是两

在Vue应用中遇到“SyntaxError: Unexpected token”怎么解决?在Vue应用中遇到“SyntaxError: Unexpected token”怎么解决?Jun 24, 2023 pm 06:55 PM

在Vue应用中遇到“SyntaxError:Unexpectedtoken”怎么解决?Vue是前端开发中广泛使用的一个JavaScript框架,它可以让我们更轻松地管理页面的状态、渲染和交互。但是在编写Vue应用时,有时会遇到“SyntaxError:Unexpectedtoken”报错,这个错误提示意味着代码中存在语法错误,JavaScript引擎

Java错误:Gradle错误,如何解决和避免Java错误:Gradle错误,如何解决和避免Jun 25, 2023 am 11:13 AM

Java作为目前最受欢迎的编程语言之一,在开发过程中常常会遇到各种各样的错误,其中Gradle错误是比较常见的一种。本文将介绍如何解决和避免Gradle错误。一、Gradle错误的原因Gradle为构建工具,其主要作用是将代码、资源文件、第三方库等打包并生成可执行的应用程序。在实际开发中,如果不注意一些细节,很容易出现Gradle错误,主要原因通常有以下几种

golang 报错:“invalid use of , operator” 如何解决?golang 报错:“invalid use of , operator” 如何解决?Jun 24, 2023 pm 07:15 PM

近年来,Golang一直受到越来越多开发者的青睐。但是,即使是最有经验的开发人员也会遇到一些挫折,比如一些报错。其中,一种常见的报错是:“invaliduseof,operator”。在这篇文章中,我将为大家介绍这个报错的原因,以及解决方法。首先,我们需要了解什么是","操作符。在Golang中,","操作符通常被用来在数组、参数列表或结构体中分隔不

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.