【问题标题】:EPERM: operation not permitted, unlink trying yarn addEPERM:不允许操作,取消链接尝试 yarn add
【发布时间】:2023-01-29 14:26:16
【问题描述】:

我是纱线新手,请原谅我的无知。

我正在尝试运行此命令(在 Windows Power Shell 上):

yarn add @solana/pay @solana/web3.js bignumber.js 

我得到这个错误:

yarn add v1.22.15
warning package.json: No license field
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning No license field
[1/4] Resolving packages...
warning @solana/pay > @solana/web3.js > rpc-websockets > circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPERM: operation not permitted, unlink 'C:\\Users\\n00b\\node_modules\\utf-8-validate\\prebuilds\\win32-ia32\\node.napi.node'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\n00b\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

我在谷歌上研究过,例如

https://stackoverflow.com/questions/46020018/error-eperm-operation-not-permitted-unlink-d-sources-node-modules-fseven

(非常旧的版本不相关)

https://github.com/phoenixframework/phoenix/issues/2464

似乎不太相关

https://www.webfoobar.com/node/39

再次没有帮助

我也尝试在命令末尾添加--no-optional,同样的问题再次发生

知道问题是什么或如何解决吗?

非常感谢

【问题讨论】:

    标签: yarnpkg


    【解决方案1】:

    我在 Windows Terminal Preview 应用程序中使用 Power Shell。

    相反,我尝试直接使用 Power Shell 应用程序(出于某种原因我认为它是更高版本)。

    它工作得很好。

    【讨论】:

      【解决方案2】:

      我对此的解决方案(同时使用本质上与编译/构建相关的依赖项)是停止服务器/节点实例。通常安装依赖项不会影响这一点,但某些依赖项 (swc) 会影响。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2023-03-07
        • 2019-11-04
        • 1970-01-01
        • 2018-02-15
        • 2020-03-05
        • 2018-05-24
        • 1970-01-01
        相关资源
        最近更新 更多