gpt4 book ai didi

How to get rid of "npm ERR! EEXIST: file already exists, rename" on files that don't exist?(如何在不存在的文件上消除“NPM错误!EEXIST:文件已存在,重命名”?)

转载 作者:bug小助手 更新时间:2023-10-25 11:34:39 25 4
gpt4 key购买 nike



This is my first actual question post. (Pls do not attack me if I do something wrong.)

这是我的第一个真正的问题帖子。(如果我做错了什么,请不要攻击我。)



I have node 5.6.0.

我有节点5.6.0。



I have downloaded a JS web app for an assignment. However, I cannot actually work on the assignment because I can't get past the following error:

我已经为一项任务下载了一个JS网络应用程序。但是,我无法实际完成作业,因为我无法克服以下错误:



S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix>npm install
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\fsevents\node_modules\rc'
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents\node_modules\rc):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EEXIST: file already exists, rename 'S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\fsevents\node_modules\.rc.DELETE\node_modules\minimist' -> 'S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\fsevents\node_modules\rc\node_modules\minimist'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File exists: S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\fsevents\node_modules\.rc.DELETE\node_modules\minimist

npm ERR! path S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\.is-accessor-descriptor.DELETE\node_modules\kind-of
npm ERR! code EEXIST
npm ERR! errno -4075
npm ERR! syscall rename
npm ERR! EEXIST: file already exists, rename 'S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\.is-accessor-descriptor.DELETE\node_modules\kind-of' -> 'S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\is-accessor-descriptor\node_modules\kind-of'
npm ERR! File exists: S:\PersonalCloud\jennylynneh\web development\code-academy\projects\project-2-beat-mix\node_modules\.is-accessor-descriptor.DELETE\node_modules\kind-of
npm ERR! Move it away, and try again.`


I have looked and I can't find any hidden files or folders related to these errors. Here is the list of what I've done in an attempt to resolve the issue:

我已经找过了,但找不到任何与这些错误相关的隐藏文件或文件夹。以下是我为解决这个问题所做的努力:




  1. Spoke to someone at Codecademy regarding the assignment zip files. They could not reproduce my issue.

  2. Deleted the node_modules folder and ran npm install again.

  3. Ran npm install a second time. This resulted in a different error regarding an invalid argument "read".

  4. Deleted entire project folder, redownloaded, unzipped, and ran npm install again.

  5. Uninstalled node, redownloaded node, and reinstalled node.

  6. Repeated #4.

  7. Ran npm cache clean --force and ran npm install again.



This part was supposed to take less than 2 min but now it's taken me over 3 hours. I just don't know what else to do. Does anyone have any suggestions?

这部分本来应该用不到2分钟的时间,但现在花了我3个多小时。我不知道还能做什么。有人有什么建议吗?



Thanks in advance for any answers. :)

事先感谢您的回复。:)



Jen


更多回答

Have you tried using a different version of node and/or npm?

您是否尝试过使用不同版本的节点和/或NPM?

Yes, I tried the 6.1.0 version as well.

是的,我也试过6.1.0版本。

优秀答案推荐

It's due to npm. Try running this:

这要归功于NPM。尝试运行以下命令:


sudo chown -R 501:20 "/Users/{username}/.npm"

更多回答

Please explain in detail what this command is doing. Running chown as root in recursive mode can be dangerous, a warning would be appreciated. Also note than {username} can be replaced by ${USER} for automated handling of the correct path.

请详细解释此命令的作用。在递归模式下以root身份运行chown可能会很危险,请警告。另请注意,{username}可以替换为${USER},以自动处理正确的路径。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com