【问题标题】:React Native - npm install give me an EPERM: opration not permitted, unlink errorReact Native - npm install 给我一个 EPERM: operation not allowed, unlink 错误
【发布时间】:2019-05-06 04:56:26
【问题描述】:

我大约 2 小时前发现了 react native,所以我想尝试一下。所以我启动了我的控制台并输入了'npm install create-react-native-app -g',安装很顺利,我决定创建一个项目。所以我输入了'create-react-native-app ReactNativeTest',那里是灾难,一个完整性错误,我在网上搜索了足够长的时间以找到解决方案,但我发现不适合我的问题,这是我的日志:

17799 warn expo-google-sign-in@2.0.0 requires a peer of react-native@^0.55.4 but none is installed. You must install peer dependencies yourself.
17800 warn react-native-reanimated@1.0.0-alpha.11 requires a peer of react@16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
17801 warn react-native-reanimated@1.0.0-alpha.11 requires a peer of react-native@^0.44.1 but none is installed. You must install peer dependencies yourself.
17802 warn url-loader@1.1.2 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
17803 verbose stack Error: sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ== integrity checksum failed when using sha512: wanted sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ== but got sha512-bD0JKadHSxamqfa/Fgbnh9CoUrFDmLMPdQmEdRPIquZLWHvo19U1kfeo3F0y0kVZfD4u4pCXP12Nj6ZY+X9Q7Q==. (1304678 bytes)
17803 verbose stack     at Transform.on (C:\Program Files\nodejs\node_modules\npm\node_modules\ssri\index.js:275:19)
17803 verbose stack     at emitNone (events.js:111:20)
17803 verbose stack     at Transform.emit (events.js:208:7)
17803 verbose stack     at endReadableNT (_stream_readable.js:1064:12)
17803 verbose stack     at _combinedTickCallback (internal/process/next_tick.js:138:11)
17803 verbose stack     at process._tickCallback (internal/process/next_tick.js:180:9)
17804 verbose cwd C:\Users\user\Desktop\Projets\ReactNativeTest
17805 verbose Windows_NT 10.0.17134
17806 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
17807 verbose node v8.11.4
17808 verbose npm  v5.6.0
17809 error code EINTEGRITY
17810 error sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ== integrity checksum failed when using sha512: wanted sha512-+taJh7bN2owmwaZpJUrNpHdmPAL6ZynNCZj15uLQgjaPFq0ZBIG2ZWuSJ48eGoUjAb3lrWxkmLlHb2eJFXc7sQ== but got sha512-bD0JKadHSxamqfa/Fgbnh9CoUrFDmLMPdQmEdRPIquZLWHvo19U1kfeo3F0y0kVZfD4u4pCXP12Nj6ZY+X9Q7Q==. (1304678 bytes)
17811 verbose exit [ 1, true ]

编辑:我尝试了一个“npm i npm”,我得到同样的错误

EDIT2:我尝试了“npm clean cache --force”,但它给了我一个新错误:

npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink

【问题讨论】:

  • 是的,我刚刚看到,我真的很抱歉,所以我做了一个npm cache clean --force,它成功了,但是现在`npm install` 给了我另一个错误:npm ERR! errno -4048 npm ERR! syscall unlink npm ERR! Error: EPERM: operation not permitted, unlink 他建议我运行该命令作为管理员,但即使作为管理员,他也给我带来了同样的错误

标签: node.js reactjs react-native npm


【解决方案1】:

问题已解决:降级到 npm@5.3

【讨论】:

    猜你喜欢
    • 2019-04-04
    • 1970-01-01
    • 1970-01-01
    • 2021-12-04
    • 1970-01-01
    • 1970-01-01
    • 2018-12-28
    • 1970-01-01
    • 2020-07-05
    相关资源
    最近更新 更多