react-native link react-native-code-push為Android原生添加依賴
之前創(chuàng)建的RN項目版本為0.43.1,在命令行執(zhí)行react-native link react-native-code-push后出現這句話:Command `link` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project.
執(zhí)行npm install后:
npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated
npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
npm ERR! path D:\aaaaa4\ch09\node_modules\fsevents\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'D:\aaaaa4\ch09\node_modules\fsevents\node_modules'
npm ERR!? { Error: EPERM: operation not permitted, scandir 'D:\aaaaa4\ch09\node_modules\fsevents\node_modules'
npm ERR!? stack: 'Error: EPERM: operation not permitted, scandir \'D:\\aaaaa4\\ch09\\node_modules\\fsevents\\node_modules\''
npm ERR!? errno: -4048,
npm ERR!? code: 'EPERM',
npm ERR!? syscall: 'scandir',
npm ERR!? path: 'D:\\aaaaa4\\ch09\\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\PC\AppData\Roaming\npm-cache\_logs\2017-11-23T01_01_14_182Z-debug.log
D:\aaaaa4\ch09>react-native link react-native-code-push
Scanning 613 folders for symlinks in D:\aaaaa4\ch09\node_modules (61ms)
再次執(zhí)行react-native link react-native-code-push后正常:
D:\aaaaa4\ch09>react-native link react-native-code-pushScanning 613 folders for symlinks in D:\aaaaa4\ch09\node_modules (61ms)? What is your CodePush deployment key for Android (hitto ignore)
在RN項目版本為0.31.0的時候執(zhí)行npm install,不會出現npm ERR!等信息,但是都可以執(zhí)行l(wèi)ink命令了(下一步添加deployment key)