显示react-native版本时出错

n7taea2i  于 2023-11-21  发布在  React
关注(0)|答案(1)|浏览(157)

当我检查react-native的一个版本时,错误输出如下:

react-native -v
fs.js:114
    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:1027: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:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25: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)

字符串

j8ag8udp

j8ag8udp1#

You have a permission error it seems ¯_(ツ)_/¯

or 

Now clean the project...

cd android 
gradlew clean

字符串

相关问题