美文网首页
CodePush热更新react-native link rea

CodePush热更新react-native link rea

作者: a2d699a00a89 | 来源:发表于2017-11-23 09:07 被阅读0次

react-native link react-native-code-push为Android原生添加依赖

之前创建的RN项目版本为0.43.1,在命令行执行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.

执行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)

再次执行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的时候执行npm install,不会出现npm ERR!等信息,但是都可以执行link命令了(下一步添加deployment key)

相关文章

网友评论

      本文标题:CodePush热更新react-native link rea

      本文链接:https://www.haomeiwen.com/subject/hjbavxtx.html