gpt4 book ai didi

npm 错误!错误 : EPERM: operation not permitted

转载 作者:行者123 更新时间:2023-12-04 12:01:33 29 4
gpt4 key购买 nike

以管理员身份从 Windows Powershell 运行,我尝试了以下所有方法。什么都行不通。不仅如此,找到错误大约需要 20 分钟。

  • 升级节点
  • 升级 npm
  • 关闭杀毒软件
  • 清理 mpm 缓存
  • 验证 npm 缓存

  • 这是尝试创建项目的输出:
    PS D:\Documents\js> create-react-app socket-io-client

    Creating a new React app in D:\Documents\js\socket-io-client.

    Installing packages. This might take a couple of minutes.
    Installing react, react-dom, and react-scripts...


    > uglifyjs-webpack-plugin@0.4.6 postinstall D:\Documents\js\socket-io-client\node_modules\uglifyjs-webpack-plugin
    > node lib/post_install.js

    npm ERR! path D:\Documents\js\socket-io-client\node_modules\fsevents\node_modules
    npm ERR! code EPERM
    npm ERR! errno -4048
    npm ERR! syscall rmdir
    npm ERR! Error: EPERM: operation not permitted, rmdir 'D:\Documents\js\socket-io-client\node_modules\fsevents\node_modules'
    npm ERR! { Error: EPERM: operation not permitted, rmdir 'D:\Documents\js\socket-io-client\node_modules\fsevents\node_modules'
    npm ERR! stack: 'Error: EPERM: operation not permitted, rmdir \'D:\\Documents\\js\\socket-io-client\\node_modules\\fsevents\\node_modules\'',
    npm ERR! errno: -4048,
    npm ERR! code: 'EPERM',
    npm ERR! syscall: 'rmdir',
    npm ERR! path: 'D:\\Documents\\js\\socket-io-client\\node_modules\\fsevents\\node_modules' }
    npm ERR!
    npm ERR! Please try running this command again as root/Administrator.

    npm ERR! A complete log of this run can be found in:
    npm ERR! C:\Users\idf\AppData\Roaming\npm-cache\_logs\2017-08-15T04_50_32_705Z-debug.log

    Aborting installation.
    npm install --save --save-exact --loglevel error react react-dom react-scripts has failed.

    Deleting generated file... package.json
    Deleting generated file... node_modules

    最佳答案

    我知道你已经解决了你的问题。但是,万一其他人收到相同的错误消息,最终对我有用的是删除这些文件夹。

    C:\Users\[username]\AppData\Roaming\npm
    C:\Users\[username]\AppData\Roaming\npm-cache

    如果问题仍然存在,请尝试以下线程中的修复之一: https://github.com/npm/npm/issues/10826 .

    关于npm 错误!错误 : EPERM: operation not permitted,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45686727/

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