使用热更新react-native link react-native-update命令时报错



  • 错误信息:
    HotTest weedx$ react-native link react-native-update
    internal/modules/cjs/loader.js:582
    throw err;
    ^

    Error: Cannot find module 'asap/raw'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/weedx/Desktop/HotTest/node_modules/promise/lib/core.js:3:12)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Module._compile (/Users/weedx/Desktop/HotTest/node_modules/pirates/lib/index.js:83:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Object.newLoader [as .js] (/Users/weedx/Desktop/HotTest/node_modules/pirates/lib/index.js:88:7)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    执行一次npm install 后再次执行该命令会成功,但是项目会报错