请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

安装code-push后,运行项目出现问题

请问老师,我安装code-push之后也进行了关联,为什么出现了这样的错误
ERROR: Unable to resolve dependency for ‘:app@releaseStaging/compileClasspath’: Could not resolve project :react-native-code-push.
Show Details
Affected Modules: app

ERROR: Unable to resolve dependency for ‘:app@releaseStagingUnitTest/compileClasspath’: Could not resolve project :react-native-code-push.
Show Details
Affected Modules: app

正在回答 回答被采纳积分+3

2回答

CrazyCodeBoy 2019-08-12 22:05:20

尝试一下方法进行解决

----

- 删除node_modules;

- npm install重新安装;

- 关闭所有终端;

- 删除APP;

- 重新运行项目;


0 回复 有任何疑惑可以回复我~
提问者 哇哦88888888 2019-08-09 16:49:20

我关联code-push时是用npm link react-native-code-push的,我用rnpm link时出现了错误,错误如下

rnpm-link ERR! ERRPACKAGEJSON No package found. Are you sure it's a React Native project?

(node:10584) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined

    at Object.projectConfigAndroid [as projectConfig] (D:\nodejs\node_global\node_modules\rnpm\src\config\android\index.js:34:17)

    at Object.getProjectConfig (D:\nodejs\node_global\node_modules\rnpm\src\config\index.js:21:22)

    at Object.link [as func] (D:\nodejs\node_global\node_modules\rnpm\node_modules\rnpm-plugin-link\src\link.js:99:22)

    at Command.runAction (D:\nodejs\node_global\node_modules\rnpm\bin\cli:23:15)

    at Command.listener (D:\nodejs\node_global\node_modules\rnpm\node_modules\commander\index.js:315:8)

    at Command.emit (events.js:198:13)

    at Command.parseArgs (D:\nodejs\node_global\node_modules\rnpm\node_modules\commander\index.js:651:12)

    at Command.parse (D:\nodejs\node_global\node_modules\rnpm\node_modules\commander\index.js:474:21)

    at Object.<anonymous> (D:\nodejs\node_global\node_modules\rnpm\bin\cli:37:5)

    at Module._compile (internal/modules/cjs/loader.js:776:30)

(node:10584) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:10584) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


0 回复 有任何疑惑可以回复我~
  • 这个问题 ,我也遇到了,使用 react native link   就解决了。
    回复 有任何疑惑可以回复我~ 2019-09-22 16:41:21
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号