使用npm install报错- operation not permitted解决
原文:https://blog.csdn.net/weixin_41715295/article/details/79508104
这几天使用npm install时一直报错-4048 operation not permitted,也尝试了多种方法,终于使问题得到解决,这里总结几种方法,先贴图:
一:权限问题
首先看到operation not permitted我们能想到权限问题,所以这时候我们可以以管理员身份运行cmd或者直接快捷键Win+X来打开。
二:依赖包错误
如上图,根据错误日志我们可以明显看到这个错误minimatch版本过低和dashdash错误,我们只要全局安装好这两个包问题就可以得到完美解决。
当我们在npm install或者通过npm install安装好一些脚手架如vue-cli或者angular-cli等,而后构建项目时报错,我们可以通过错误提示正确全局安装好所需要的依赖包就好了。
一般在这种情况下我们需要重点看operation not permitted后面这个关键单词和后面的目录。
三:npm版本问题
npm最新版本5.4.0在安装包时有些缺少依赖包,这种情况就需要我们安装低一点的npm版本:npm i -g npm@5.3.0(这里填写你需要的指定版本)。
以上是个人根据自己遇到情况总结的一些方法,当然重点在看自己的错误日志提示。
使用npm install报错- operation not permitted解决的更多相关文章
- 执行npm install报错:npm ERR! code EINTEGRITY
命令行执行npm install报错如下: D:\frontend\viewsdev>npm install npm ERR! code EINTEGRITY npm ERR! sha512-8 ...
- npm install 报错:node-pre-gyp ERR! 问题解决
npm install报错问题解决 问题: E:\CodeSpace\GitlabTest\desktop>npm install > lifeccp-desktop@1.1.9 post ...
- npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法
npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...
- 在运行vue项目时,执行npm install报错小记
在运行vue项目时,执行npm install 报错,导致后续的执行报各种错误,根据报错,尝试了网上的各种办法,最后发现时网络问题下载失败导致,解决办法: 安装cnpm==>npm instal ...
- npm install 报错解决办法
npm install 报错解决办法 原因是因为node_modules可能有意外改动,导致依赖库不完整,删除项目下的node_modules,在你的项目目录下,重新执行npm install,这会重 ...
- npm install 报错(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解决方法
npm ERR! path E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\node_mod ...
- npm install 报错:ERR! code EINTEGRITY 解决方案
npm升级后,npm install 报错了,报错信息:ERR! code EINTEGRITY到处百度搜索解决方案,终于找到了!“npm cache verify”这条命令帮助了不少人 npm ca ...
- npm install报错类似于npm WARN tar ENOENT: no such file or directory, open '***\node_modules\.staging\***
报错类似于如下图 解决方法: 删除文件 package-lock.json,再重新执行npm i或者npm install
- 前端vue项目执行npm install 报错cd() never called()
前端我刚开始接触Vue,从GitHub上下载了代码程序,但缺少一些插件,用vscode打开并下载插件执行报错cd() never called! 解决的方式 1.执行cmd命令行不要再vscode里执 ...
随机推荐
- [java]Stream API——collect、reduce、orElse(x)
一.collect 1.R collect(Supplier supplier, BiConsumer accumulator, BiConsumer combiner) supplier:一个能创造 ...
- ElasticSearch + Canal 开发千万级的实时搜索系统【转】
公司是做社交相关产品的,社交类产品对搜索功能需求要求就比较高,需要根据用户城市.用户ID昵称等进行搜索. 项目原先的搜索接口采用SQL查询的方式实现,数据库表采用了按城市分表的方式.但随着业务的发展, ...
- 二十一 Python分布式爬虫打造搜索引擎Scrapy精讲—爬虫数据保存
注意:数据保存的操作都是在pipelines.py文件里操作的 将数据保存为json文件 spider是一个信号检测 # -*- coding: utf-8 -*- # Define your ite ...
- Mysql之select
SELECT {*|<字段列表>} [ FROM <表1>,<表2>,…,<表n> WHERE <表达式> GROUP BY ...
- es6 nodejs compose
const compose = (...fns) => { let len = fns.length; let fn_index = len - 1; let fn_result; functi ...
- linux下使用FreeRDP 连接 Windows 远程桌面
linux下使用FreeRDP 连接 Windows 远程桌面 简介 FreeRDP 是一款开源的远程桌面系统,支持多种平台, 在 ubuntu 中使用 FreeRDP 可以很方便的登录到 win ...
- Loadrunner 11检查点使用方法总结
在使用Loadrunner 11进行性能测试中,有时需要对性能测试中的功能是否全部正确进行判断.这里就需要用到“检查点”,本文总结了常用三种协议下检查点的使用方法,希望阅读本文后的小伙伴们能够掌握其使 ...
- 快速切题 poj 2485 Highways prim算法+堆 不完全优化 难度:0
Highways Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23033 Accepted: 10612 Descri ...
- 【linux】VirtualBox-“please use a kernel appropriate for your cpu”
This kernel requires the following features not present on the CPU:paeUnable to boot – please use a ...
- [Scala]Scala学习笔记四 类
1. 简单类与无参方法 class Person { var age = 0 // 必须初始化字段 def getAge() = age // 方法默认为公有的 } 备注 在Scala中,类并不声明为 ...