The operation was rejected by your operating system. npm ERR! It‘s possible that the file was alrea

这篇具有很好参考价值的文章主要介绍了The operation was rejected by your operating system. npm ERR! It‘s possible that the file was alrea。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

在win10系统下安装node.js出现了如下的报错。

C:\Users\lenovo>npm install -g vue
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path F:\node\node_cache\_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'F:\node\node_cache\_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa'
npm ERR!  [Error: EPERM: operation not permitted, open 'F:\node\node_cache\_cacache\index-v5\4b\d5\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'F:\\node\\node_cache\\_cacache\\index-v5\\4b\\d5\\ac02d8eac51f5c368b18a948d14b7ba882d43e6f4cafddbf9dda740d2afa',
npm ERR!   requiredBy: '.'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! Log files were not written due to an error writing to the directory: F:\node\node_cache\_logs
npm ERR! You can rerun the command with `--loglevel=verbose` to see the logs in your terminal

首先需要在安装node.js文件夹中自行创立这两个文件夹,node_global代表全局变量的文件夹,node_cache代表缓存的文件夹。
接下来要配置文件:

npm config set prefix "D:\Coding_tools\Nodejs\node_global"
npm config set cache "D:\Coding_tools\Nodejs\node_cache"

这里换成自己的路径即可。
接下来就是配置环境变量:
The operation was rejected by your operating system. npm ERR! It‘s possible that the file was alrea,node.js报错,npm,node.js,前端
The operation was rejected by your operating system. npm ERR! It‘s possible that the file was alrea,node.js报错,npm,node.js,前端然后将用户变量中Path,关于node的环境变量改为目前的全局变量地址。

The operation was rejected by your operating system. npm ERR! It‘s possible that the file was alrea,node.js报错,npm,node.js,前端这样就可以了,但是当我们再到cmd窗口去进行npm下载时就会报错
报错的内容说是权限不够,不能新建_cacache,这表示目前的权限不够,所以需要换管理员模式的powershell,与我之前用的管理员模式的cmd不太相同,仅供参考:
在搜索窗口上输入powershell,选择run as Administrator即可
The operation was rejected by your operating system. npm ERR! It‘s possible that the file was alrea,node.js报错,npm,node.js,前端文章来源地址https://www.toymoban.com/news/detail-530909.html

到了这里,关于The operation was rejected by your operating system. npm ERR! It‘s possible that the file was alrea的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • QT报错:The inferior stopped because it received a signal from the Operating System.

    QT运行报错 Signal received The inferior stopped because it received a signal from the Operating System. Signal name : SIGSEGV Signal meaning : Segmentation fault 这个错误说明程序中有野指针 .h文件中 .cpp文件 errordlg为野指针,使用new重新分配内存

    2024年02月16日
    浏览(29)
  • The database operation was expected to affect 1 row(s), but actually affected 0 row(s); 解决乐观并发

    EF Core 实现 乐观并发 ,假定并发冲突相对较少。 与 悲观 方法(即先锁定数据,然后才继续修改数据)不同,乐观并发不需要锁定,而是安排数据修改在保存时失败(如果数据自查询后已更改)。 此并发故障将报告给应用程序,应用程序可能会通过对新数据重试整个操作来

    2024年02月11日
    浏览(37)
  • 报错解决 one of the variables needed for gradient computation has been modified by an inplace operation

     one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [16, 64, 256, 256]], which is output 0 of LeakyReluBackward1, is at version 1;  最近跑代码遇到了这样的一个问题,在网上找了很多方法都没有很好的解决,今天就在这个博客里面将所有的解决办法整

    2024年02月16日
    浏览(37)
  • MySQL报错:Access denied; you need (at least one of) the SYSTEM_USER privilege(s) for this operation

    今天在尝试删除已建的一个视图时,发现提示这个报错,多方查找解决办法后记录一下。 原因是MySQL8.0.16版本中新增了一个system_user帐户类型,我们需要把权限给添加进去,使用下方的代码,此处的root可以是你当前使用的账户 此时可解决,再尝试之前的操作发现就可以进行了

    2024年02月10日
    浏览(39)
  • ERROR: The Nouveau kernel driver is currently in use by your system;新电脑安装NVIDIA的GPU驱动报错问题解决

    Ubuntu 安装 NVIDIA 显卡驱动详细步骤(ERROR: The Nouveau kernel driver is currently in use by your system) ERROR: The Nouveau kernel driver is currently in use by your system. This driver is incompatible with the NVIDIA driver…… 在禁用 Nouveau 驱动前我们先了解下它是啥?有什么作用。 Nouveau 是由第三方为 NVIDIA 显卡开

    2024年02月11日
    浏览(34)
  • Push rejected: Push master to origin/master was rejected by remote

    这问题折腾我一下午,头皮发麻,记录一下   push时总是出现Push rejected: Push master to origin/master was rejected by remote这个问题,按网上说的改权限也不行,改分支也不行,后来查着查着发现了一个很神奇的玩意儿  根据这篇文章https://www.cnblogs.com/bznxn77/p/14959663.html   把这玩意关了

    2024年02月12日
    浏览(61)
  • 电脑显示“Operating System not found”该怎么办?

    “Operating System not found”是一种常见的电脑错误提示,这类错误会导致你无法成功启动Windows。那么电脑显示“Operating System not found”该怎么办呢? 首先,您可以测试硬盘是否存在问题。为此,您可以采取以下步骤: 1.  关闭电脑 ,等待5秒。 2. 按电源键启动电脑,反复按 F1

    2024年02月11日
    浏览(26)
  • Push master to origin/master was rejected by remote

    很多人 ,百度半天网上都是教你们按照他们的解决方案来,但你们真的懂原因吗?其实不见其然,所以本篇就告诉你怎么去找到问题的具体的报错和解决它。 很多人都是本地pull正常,push报错,而且基本都是报Push master to origin/master was rejected by remote这个错误,其实,大家可以

    2024年02月11日
    浏览(47)
  • android.system.ErrnoException: open failed: EPERM (Operation not permitted)

    android 10(Q)开始增加了沙盒机制,不能直接把文件保存到/sdcard目录下,只能保存到APP专属目录下;AndroidManifest.xml在标签下增加属性【android:requestLegacyExternalStorage=“true”】可以暂时保存到/sdcard路径下,但是Android11开始就失效了 我们可以通过Context的getExternalFilesDir(null)方法获取

    2024年02月12日
    浏览(34)
  • [架构之路-178]-《软考-系统分析师》- 分区操作系统(Partition Operating System)概述

    目录: 本文概述: 1.1 什么是分区操作系统 1.2 分区操作系统出现背景 1. 前后台系统(Foreground/Background System) 2. 实时操作系统(RTOS) 随着 嵌入式系统 日趋 复杂化 以及对 安全性 要求的不断提高,采用 空间隔离 、时间预先分配的 分时分区 操作系统已经成为未来的发展方向。

    2024年02月01日
    浏览(45)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包