2016-04-05 50 views
1

我正在使用react-native來捆綁Android APK。 我能夠在開發模式下正常運行它,但尚未能發佈已簽名的apk。 node version: `v5.10.0` npm version: `3.8.3` react-native version: `0.22.2` 試圖用巴貝爾核版本 6.5.1 6.4.5 6.7.4react-native軟件包會在dev和prod模式下引發SyntaxError

我上運行這些命令 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

react-native bundle --platform android --dev true --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

的得到的錯誤是

bundle: Created ReactPackager 
uncaught error Error: SyntaxError: /Users/'username'/projects/personal/openchs/openchs-client/node_modules/react-native/Libraries/react-native/react-native.js: 

意外令牌(120:2) //注意:此必須放在最後,以防止上述 吸氣劑包裹的子模塊的急切 //評價...要求( '陣營'), };

if (__DEV__) { 
    at Parser.pp.raise (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:1378:13) 
    at Parser.pp.unexpected (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:2817:8) 
    at Parser.pp.parseIdentifier (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:1227:10) 
    at Parser.pp.parsePropertyName (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:1070:135) 
    at Parser.pp.parseObj (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:986:12) 
    at Parser.pp.parseExprAtom (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:718:19) 
    at Parser.parseExprAtom (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:4305:22) 
    at Parser.pp.parseExprSubscripts (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:504:19) 
    at Parser.pp.parseMaybeUnary (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:484:19) 
    at Parser.pp.parseExprOps (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/babylon/index.js:415:19) 
See logs /var/folders/zj/sk4075x566l8jdl1gwzjl79h0000gn/T/react-packager.log 
    at SocketClient._handleMessage (SocketClient.js:144:23) 
    at BunserBuf.<anonymous> (SocketClient.js:53:42) 
    at emitOne (events.js:90:13) 
    at BunserBuf.emit (events.js:182:7) 
    at BunserBuf.process (/Users/mihir/projects/personal/openchs/openchs-client/node_modules/bser/index.js:289:10) 
    at /Users/mihir/projects/personal/openchs/openchs-client/node_modules/bser/index.js:244:12 
    at _combinedTickCallback (internal/process/next_tick.js:67:7) 
    at process._tickCallback (internal/process/next_tick.js:98:9) 

更多的我的代碼是在這裏 - https://github.com/OpenCHS/openchs-client

回答

相關問題