gpt4 book ai didi

ios - EPERM : operation not permitted, chmod @react-native-community iOS

转载 作者:行者123 更新时间:2023-12-01 18:23:59 28 4
gpt4 key购买 nike

我正在使用React v16.8.6和react-native v0.59.6。 iOS。

当输入 react-native --version 或任何带有 react-native 前缀的内容时,它显示以下错误。

internal/fs/utils.js:220
throw err;
^

Error: EPERM: operation not permitted, chmod '/usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/server/external/xsel'
at Object.chmodSync (fs.js:1104:3)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/server/copyToClipBoard.js:50:15)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/server/middleware/copyToClipBoardMiddleware.js:8:47)
at Module._compile (internal/modules/cjs/loader.js:956:30) {
errno: -1,
syscall: 'chmod',
code: 'EPERM',
path: '/usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli/build/commands/server/external/xsel'
}

我清理了该项目。重新启动它。

删除 npm 包并重新安装。

尝试过npm install -g react-native-cli

我的 package.lock.json 依赖项中有 react-native-community/cli 版本 1.12.0

我不知道该怎么做。我无法链接任何库和其他需要 react native 关键字的东西。

此外,如果我使用 sudo 运行它,例如 sudo react-native --version,它会像下面提到的那样。

warn Your project is using deprecated "rnpm" config that will stop working from next release. Please use a "react-native.config.js" file to configure the React Native CLI. Migration guide: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
warn The following packages use deprecated "rnpm" config that will stop working from next release:
- react-native-google-sign in: https://github.com/react-native-community/react-native-google-signin
- react-native-video: https://github.com/react-native-community/react-native-video#readme
Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
3.0.4

请提出一些相关指导。

谢谢。

最佳答案

rm -rf node_modules && npm install 这将解决您的问题。

是因为依赖包的兼容性问题。尝试从目录中移动/删除 package-lock.json 并再次进行安装。

关于ios - EPERM : operation not permitted, chmod @react-native-community iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59409435/

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