0

I tried to build the android directory in my react native project in Android Studio and this is the error I am getting:

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)

This is the line of code which is causing that error:

 _processBundleRequest = this._createRequestProcessor({

 ...
 ...
  })

1 Answer 1

1

Found an answer to this. The problem is very likely in your node version. After upgrading to v16 it worked just fine.

Sign up to request clarification or add additional context in comments.

1 Comment

tried this and it works just fine!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.