Reputation: 2004
I am getting following error while building Android Application. Can anyone explain why it is happening
import type {CommandT} from './commands';
^^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:74:7)
at createScript (vm.js:246:10)
at Object.runInThisContext (vm.js:298:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Module._compile (E:\React_Project\OneTap\node_modules\pirates\lib\index.js:91:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (E:\React_Project\OneTap\node_modules\pirates\lib\index.js:96:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Upvotes: 1
Views: 192
Reputation: 1275
Based on this GitHub Issue it looks like this is a problem related to RN 0.56 in Windows. As a workaround I would recommend using version 0.55.4.
Upvotes: 2