简体   繁体   English

尝试构建我的 React Native android 文件时出错

[英]Getting an error while trying to build my react native android file

I tried to build the android directory in my react native project in Android Studio and this is the error I am getting:我试图在 Android Studio 的 React Native 项目中构建 android 目录,这是我收到的错误:

1Gradle sync failed: /home/pranil/my-code/conquer_app/node_modules/metro/src/Server.js:585 _processBundleRequest = this._createRequestProcessor({ ^SyntaxError: Unexpected token = at Module._compile (internal/modules/cjs/loader.js:723:23) 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. (/home/pranil/my-code/conquer_app/node_modules/metro/src/shared/output/bundle.js:12:16) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) (8 s 471 ms) 1Gradle 同步失败:/home/pranil/my-code/conquer_app/node_modules/metro/src/Server.js:585 _processBundleRequest = this._createRequestProcessor({ ^SyntaxError: Unexpected token = at Module._compile (internal/modules/cjs/ loader.js:723:23) 在 Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) 在 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. (/home/pranil/my-code/conquer_app/node_modules/metro/src/shared/output/ bundle.js:12:16) 在 Module._compile (internal/modules/cjs/loader.js:778:30) 在 Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) ) (8 秒 471 毫秒)

This is the line of code which is causing that error:这是导致该错误的代码行:

 _processBundleRequest = this._createRequestProcessor({

 ...
 ...
  })

Any movement on this?这有什么动静吗? I am having the same issue.我有相同的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM