zalmoxisus / crossbuilder

Building web, Electron, Cordova and Chrome apps, and cross-browser extensions with React, Redux and Webpack. "Write once, deploy everywhere" concept in practice.
MIT License
484 stars 50 forks source link

Electron: SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode #36

Closed bartonhammond closed 8 years ago

bartonhammond commented 8 years ago

I did following commands:

npm install
npm run start:electron

and here is the output and gif

[09:38:35] Finished 'webpack:build:electron' after 3.08 s
[09:38:35] Starting 'build:electron'...
[09:38:35] Finished 'build:electron' after 5.22 μs
App threw an error when running [SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode]
screen shot 2016-03-10 at 9 39 40 am

Full log follows:

~/projects/electron/crossbuilder (master)$ npm run start:electron

> crossbuilder@0.7.1 start:electron /Users/barton/projects/electron/crossbuilder
> rm -rf ./build/electron/ && gulp build:electron && electron ./build/electron/

[09:42:19] Requiring external module babel-register
[09:42:23] Using gulpfile ~/projects/electron/crossbuilder/gulpfile.babel.js
[09:42:24] Starting 'webpack:build:electron'...
[09:42:24] Starting 'views:build:electron'...
[09:42:24] Finished 'views:build:electron' after 16 ms
[09:42:24] Starting 'copy:build:electron'...
[09:42:24] Finished 'copy:build:electron' after 2.31 ms
[09:42:27] [webpack:build] Hash: 3f78f35c1485d53c2376
Version: webpack 1.12.14
Time: 3102ms
        Asset    Size  Chunks             Chunk Names
app.bundle.js  169 kB       0  [emitted]  app
chunk    {0} app.bundle.js (app) 766 kB [rendered]
    [0] multi app 28 bytes {0} [built]
    [1] ./src/web/index.js 623 bytes {0} [built]
    [2] ./~/react/react.js 56 bytes {0} [built]
    [3] ./~/react/lib/React.js 1.49 kB {0} [built]
    [4] ./~/react/lib/ReactDOM.js 3.71 kB {0} [built]
    [5] ./~/react/lib/ReactCurrentOwner.js 653 bytes {0} [built]
    [6] ./~/react/lib/ReactDOMTextComponent.js 4.32 kB {0} [built]
    [7] ./~/react/lib/DOMChildrenOperations.js 5 kB {0} [built]
    [8] ./~/react/lib/Danger.js 6.96 kB {0} [built]
    [9] ./~/react/~/fbjs/lib/ExecutionEnvironment.js 1.09 kB {0} [built]
   [10] ./~/react/~/fbjs/lib/createNodesFromMarkup.js 2.71 kB {0} [built]
   [11] ./~/react/~/fbjs/lib/createArrayFromMixed.js 2.36 kB {0} [built]
   [12] ./~/react/~/fbjs/lib/toArray.js 1.98 kB {0} [built]
   [13] ./~/react/~/fbjs/lib/invariant.js 1.51 kB {0} [built]
   [14] ./~/react/~/fbjs/lib/getMarkupWrap.js 3.06 kB {0} [built]
   [15] ./~/react/~/fbjs/lib/emptyFunction.js 1.09 kB {0} [built]
   [16] ./~/react/lib/ReactMultiChildUpdateTypes.js 861 bytes {0} [built]
   [17] ./~/react/~/fbjs/lib/keyMirror.js 1.27 kB {0} [built]
   [18] ./~/react/lib/ReactPerf.js 2.51 kB {0} [built]
   [19] ./~/react/lib/setInnerHTML.js 3.35 kB {0} [built]
   [20] ./~/react/lib/setTextContent.js 1.2 kB {0} [built]
   [21] ./~/react/lib/escapeTextContentForBrowser.js 849 bytes {0} [built]
   [22] ./~/react/lib/DOMPropertyOperations.js 7.88 kB {0} [built]
   [23] ./~/react/lib/DOMProperty.js 9.57 kB {0} [built]
   [24] ./~/react/lib/quoteAttributeValueForBrowser.js 746 bytes {0} [built]
   [25] ./~/react/~/fbjs/lib/warning.js 1.77 kB {0} [built]
   [26] ./~/react/lib/ReactComponentBrowserEnvironment.js 1.26 kB {0} [built]
   [27] ./~/react/lib/ReactDOMIDOperations.js 3.29 kB {0} [built]
   [28] ./~/react/lib/ReactMount.js 36.8 kB {0} [built]
   [29] ./~/react/lib/ReactBrowserEventEmitter.js 12.4 kB {0} [built]
   [30] ./~/react/lib/EventConstants.js 2.04 kB {0} [built]
   [31] ./~/react/lib/EventPluginHub.js 9.22 kB {0} [built]
   [32] ./~/react/lib/EventPluginRegistry.js 8.41 kB {0} [built]
   [33] ./~/react/lib/EventPluginUtils.js 6.79 kB {0} [built]
   [34] ./~/react/lib/ReactErrorUtils.js 2.27 kB {0} [built]
   [35] ./~/react/lib/accumulateInto.js 1.74 kB {0} [built]
   [36] ./~/react/lib/forEachAccumulated.js 893 bytes {0} [built]
   [37] ./~/react/lib/ReactEventEmitterMixin.js 1.3 kB {0} [built]
   [38] ./~/react/lib/ViewportMetrics.js 638 bytes {0} [built]
   [39] ./~/react/lib/Object.assign.js 1.26 kB {0} [built]
   [40] ./~/react/lib/isEventSupported.js 1.97 kB {0} [built]
   [41] ./~/react/lib/ReactDOMFeatureFlags.js 458 bytes {0} [built]
   [42] ./~/react/lib/ReactElement.js 8.07 kB {0} [built]
   [43] ./~/react/lib/canDefineProperty.js 629 bytes {0} [built]
   [44] ./~/react/lib/ReactEmptyComponentRegistry.js 1.38 kB {0} [built]
   [45] ./~/react/lib/ReactInstanceHandles.js 10.6 kB {0} [built]
   [46] ./~/react/lib/ReactRootIndex.js 723 bytes {0} [built]
   [47] ./~/react/lib/ReactInstanceMap.js 1.25 kB {0} [built]
   [48] ./~/react/lib/ReactMarkupChecksum.js 1.39 kB {0} [built]
   [49] ./~/react/lib/adler32.js 1.2 kB {0} [built]
   [50] ./~/react/lib/ReactReconciler.js 3.55 kB {0} [built]
   [51] ./~/react/lib/ReactRef.js 2.34 kB {0} [built]
   [52] ./~/react/lib/ReactOwner.js 3.45 kB {0} [built]
   [53] ./~/react/lib/ReactUpdateQueue.js 10.9 kB {0} [built]
   [54] ./~/react/lib/ReactUpdates.js 8.54 kB {0} [built]
   [55] ./~/react/lib/CallbackQueue.js 2.44 kB {0} [built]
   [56] ./~/react/lib/PooledClass.js 3.55 kB {0} [built]
   [57] ./~/react/lib/Transaction.js 9.55 kB {0} [built]
   [58] ./~/react/~/fbjs/lib/emptyObject.js 482 bytes {0} [built]
   [59] ./~/react/~/fbjs/lib/containsNode.js 1.43 kB {0} [built]
   [60] ./~/react/~/fbjs/lib/isTextNode.js 628 bytes {0} [built]
   [61] ./~/react/~/fbjs/lib/isNode.js 712 bytes {0} [built]
   [62] ./~/react/lib/instantiateReactComponent.js 4.52 kB {0} [built]
   [63] ./~/react/lib/ReactCompositeComponent.js 27.5 kB {0} [built]
   [64] ./~/react/lib/ReactComponentEnvironment.js 1.67 kB {0} [built]
   [65] ./~/react/lib/ReactPropTypeLocations.js 549 bytes {0} [built]
   [66] ./~/react/lib/ReactPropTypeLocationNames.js 611 bytes {0} [built]
   [67] ./~/react/lib/shouldUpdateReactComponent.js 1.49 kB {0} [built]
   [68] ./~/react/lib/ReactEmptyComponent.js 1.68 kB {0} [built]
   [69] ./~/react/lib/ReactNativeComponent.js 3.02 kB {0} [built]
   [70] ./~/react/lib/validateDOMNesting.js 13.1 kB {0} [built]
   [71] ./~/react/lib/ReactDefaultInjection.js 3.99 kB {0} [built]
   [72] ./~/react/lib/BeforeInputEventPlugin.js 14.9 kB {0} [built]
   [73] ./~/react/lib/EventPropagators.js 5.22 kB {0} [built]
   [74] ./~/react/lib/FallbackCompositionState.js 2.49 kB {0} [built]
   [75] ./~/react/lib/getTextContentAccessor.js 994 bytes {0} [built]
   [76] ./~/react/lib/SyntheticCompositionEvent.js 1.16 kB {0} [built]
   [77] ./~/react/lib/SyntheticEvent.js 5.79 kB {0} [built]
   [78] ./~/react/lib/SyntheticInputEvent.js 1.15 kB {0} [built]
   [79] ./~/react/~/fbjs/lib/keyOf.js 1.11 kB {0} [built]
   [80] ./~/react/lib/ChangeEventPlugin.js 11.5 kB {0} [built]
   [81] ./~/react/lib/getEventTarget.js 930 bytes {0} [built]
   [82] ./~/react/lib/isTextInputElement.js 1.03 kB {0} [built]
   [83] ./~/react/lib/ClientReactRootIndex.js 551 bytes {0} [built]
   [84] ./~/react/lib/DefaultEventPluginOrder.js 1.26 kB {0} [built]
   [85] ./~/react/lib/EnterLeaveEventPlugin.js 3.9 kB {0} [built]
   [86] ./~/react/lib/SyntheticMouseEvent.js 2.2 kB {0} [built]
   [87] ./~/react/lib/SyntheticUIEvent.js 1.64 kB {0} [built]
   [88] ./~/react/lib/getEventModifierState.js 1.3 kB {0} [built]
   [89] ./~/react/lib/HTMLDOMPropertyConfig.js 7.63 kB {0} [built]
   [90] ./~/react/lib/ReactBrowserComponentMixin.js 1.15 kB {0} [built]
   [91] ./~/react/lib/findDOMNode.js 2.17 kB {0} [built]
   [92] ./~/react/lib/ReactDefaultBatchingStrategy.js 1.92 kB {0} [built]
   [93] ./~/react/lib/ReactDOMComponent.js 36.9 kB {0} [built]
   [94] ./~/react/lib/AutoFocusUtils.js 816 bytes {0} [built]
   [95] ./~/react/~/fbjs/lib/focusNode.js 725 bytes {0} [built]
   [96] ./~/react/lib/CSSPropertyOperations.js 5.71 kB {0} [built]
   [97] ./~/react/lib/CSSProperty.js 3.5 kB {0} [built]
   [98] ./~/react/~/fbjs/lib/camelizeStyleName.js 1.03 kB {0} [built]
   [99] ./~/react/~/fbjs/lib/camelize.js 729 bytes {0} [built]
  [100] ./~/react/lib/dangerousStyleValue.js 1.93 kB {0} [built]
  [101] ./~/react/~/fbjs/lib/hyphenateStyleName.js 1 kB {0} [built]
  [102] ./~/react/~/fbjs/lib/hyphenate.js 822 bytes {0} [built]
  [103] ./~/react/~/fbjs/lib/memoizeStringOnly.js 778 bytes {0} [built]
  [104] ./~/react/lib/ReactDOMButton.js 1.15 kB {0} [built]
  [105] ./~/react/lib/ReactDOMInput.js 5.74 kB {0} [built]
  [106] ./~/react/lib/LinkedValueUtils.js 5.18 kB {0} [built]
  [107] ./~/react/lib/ReactPropTypes.js 12.3 kB {0} [built]
  [108] ./~/react/lib/getIteratorFn.js 1.17 kB {0} [built]
  [109] ./~/react/lib/ReactDOMOption.js 2.82 kB {0} [built]
  [110] ./~/react/lib/ReactChildren.js 5.83 kB {0} [built]
  [111] ./~/react/lib/traverseAllChildren.js 6.9 kB {0} [built]
  [112] ./~/react/lib/ReactDOMSelect.js 6.11 kB {0} [built]
  [113] ./~/react/lib/ReactDOMTextarea.js 4.35 kB {0} [built]
  [114] ./~/react/lib/ReactMultiChild.js 14.7 kB {0} [built]
  [115] ./~/react/lib/ReactChildReconciler.js 4.52 kB {0} [built]
  [116] ./~/react/lib/flattenChildren.js 1.65 kB {0} [built]
  [117] ./~/react/~/fbjs/lib/shallowEqual.js 1.28 kB {0} [built]
  [118] ./~/react/lib/ReactEventListener.js 7.51 kB {0} [built]
  [119] ./~/react/~/fbjs/lib/EventListener.js 2.65 kB {0} [built]
  [120] ./~/react/~/fbjs/lib/getUnboundedScrollPosition.js 1.09 kB {0} [built]
  [121] ./~/react/lib/ReactInjection.js 1.37 kB {0} [built]
  [122] ./~/react/lib/ReactClass.js 27.8 kB {0} [built]
  [123] ./~/react/lib/ReactComponent.js 5.04 kB {0} [built]
  [124] ./~/react/lib/ReactNoopUpdateQueue.js 3.94 kB {0} [built]
  [125] ./~/react/lib/ReactReconcileTransaction.js 4.58 kB {0} [built]
  [126] ./~/react/lib/ReactInputSelection.js 4.32 kB {0} [built]
  [127] ./~/react/lib/ReactDOMSelection.js 6.83 kB {0} [built]
  [128] ./~/react/lib/getNodeForCharacterOffset.js 1.66 kB {0} [built]
  [129] ./~/react/~/fbjs/lib/getActiveElement.js 924 bytes {0} [built]
  [130] ./~/react/lib/SelectEventPlugin.js 6.71 kB {0} [built]
  [131] ./~/react/lib/ServerReactRootIndex.js 868 bytes {0} [built]
  [132] ./~/react/lib/SimpleEventPlugin.js 17.4 kB {0} [built]
  [133] ./~/react/lib/SyntheticClipboardEvent.js 1.23 kB {0} [built]
  [134] ./~/react/lib/SyntheticFocusEvent.js 1.12 kB {0} [built]
  [135] ./~/react/lib/SyntheticKeyboardEvent.js 2.76 kB {0} [built]
  [136] ./~/react/lib/getEventCharCode.js 1.56 kB {0} [built]
  [137] ./~/react/lib/getEventKey.js 2.93 kB {0} [built]
  [138] ./~/react/lib/SyntheticDragEvent.js 1.13 kB {0} [built]
  [139] ./~/react/lib/SyntheticTouchEvent.js 1.33 kB {0} [built]
  [140] ./~/react/lib/SyntheticWheelEvent.js 1.99 kB {0} [built]
  [141] ./~/react/lib/SVGDOMPropertyConfig.js 3.8 kB {0} [built]
  [142] ./~/react/lib/ReactVersion.js 379 bytes {0} [built]
  [143] ./~/react/lib/renderSubtreeIntoContainer.js 463 bytes {0} [built]
  [144] ./~/react/lib/ReactDOMServer.js 766 bytes {0} [built]
  [145] ./~/react/lib/ReactServerRendering.js 3.3 kB {0} [built]
  [146] ./~/react/lib/ReactServerBatchingStrategy.js 673 bytes {0} [built]
  [147] ./~/react/lib/ReactServerRenderingTransaction.js 2.3 kB {0} [built]
  [148] ./~/react/lib/ReactIsomorphic.js 2.05 kB {0} [built]
  [149] ./~/react/lib/ReactDOMFactories.js 3.36 kB {0} [built]
  [150] ./~/react/lib/ReactElementValidator.js 10.8 kB {0} [built]
  [151] ./~/react/~/fbjs/lib/mapObject.js 1.47 kB {0} [built]
  [152] ./~/react/lib/onlyChild.js 1.21 kB {0} [built]
  [153] ./~/react/lib/deprecated.js 1.77 kB {0} [built]
  [154] ./~/react-dom/index.js 63 bytes {0} [built]
  [155] ./src/app/containers/Root.js 2.59 kB {0} [built]
  [156] ./~/react-redux/lib/index.js 475 bytes {0} [built]
  [157] ./~/react-redux/lib/components/Provider.js 2.94 kB {0} [built]
  [158] ./~/react-redux/lib/utils/storeShape.js 262 bytes {0} [built]
  [159] ./~/react-redux/lib/components/connect.js 12.8 kB {0} [built]
  [160] ./~/react-redux/lib/utils/shallowEqual.js 543 bytes {0} [built]
  [161] ./~/react-redux/lib/utils/wrapActionCreators.js 268 bytes {0} [built]
  [162] ./~/redux/lib/index.js 1.94 kB {0} [built]
  [163] ./~/redux/lib/createStore.js 7.68 kB {0} [built]
  [164] ./~/redux/~/lodash/isPlainObject.js 1.72 kB {0} [built]
  [165] ./~/redux/~/lodash/_isHostObject.js 552 bytes {0} [built]
  [166] ./~/redux/~/lodash/isObjectLike.js 592 bytes {0} [built]
  [167] ./~/redux/lib/combineReducers.js 5.52 kB {0} [built]
  [168] ./~/redux/lib/utils/warning.js 665 bytes {0} [built]
  [169] ./~/redux/lib/bindActionCreators.js 2.04 kB {0} [built]
  [170] ./~/redux/lib/applyMiddleware.js 2.03 kB {0} [built]
  [171] ./~/redux/lib/compose.js 830 bytes {0} [built]
  [172] ./~/react-redux/~/lodash/isPlainObject.js 1.72 kB {0} [built]
  [173] ./~/react-redux/~/lodash/_isHostObject.js 552 bytes {0} [built]
  [174] ./~/react-redux/~/lodash/isObjectLike.js 592 bytes {0} [built]
  [175] ./~/react-redux/~/hoist-non-react-statics/index.js 921 bytes {0} [built]
  [176] ./~/react-redux/~/invariant/browser.js 1.52 kB {0} [built]
  [177] ./src/app/containers/App.js 969 bytes {0} [built]
  [178] ./src/app/components/Counter.js 2.4 kB {0} [built]
  [179] ./src/app/actions/counter.js 896 bytes {0} [built]
  [180] ./src/app/constants/ActionTypes.js 345 bytes {0} [built]
  [181] ./src/app/store/configureStore.js 1.99 kB {0} [built]
  [182] ./~/redux-thunk/lib/index.js 306 bytes {0} [built]
  [183] ./~/redux-notify/lib/index.js 1.42 kB {0} [built]
  [184] ./src/app/reducers/index.js 676 bytes {0} [built]
  [185] ./src/app/reducers/counter.js 1.37 kB {0} [built]
  [186] ./src/app/reducers/extension.js 303 bytes {0} [built]
  [187] ./src/app/events/notifyEvents.js 463 bytes {0} [built]
  [188] ./src/app/actions/extension.js 597 bytes {0} [built]
  [189] ./~/crossmessaging/lib/index.js 3.08 kB {0} [built]
  [190] ./src/app/store/getStoredState.js 1.04 kB {0} [built]
  [191] ./~/redux-persist/lib/index.js 407 bytes {0} [built]
  [192] ./~/redux-persist/lib/defaults/asyncLocalStorage.js 2.42 kB {0} [built]
  [193] (webpack)/~/node-libs-browser/~/timers-browserify/main.js 2.1 kB {0} [built]
  [194] (webpack)/~/node-libs-browser/~/process/browser.js 2.06 kB {0} [built]
  [195] ./~/redux-persist/lib/persistStore.js 5.31 kB {0} [built]
  [196] ./~/redux-persist/~/lodash.foreach/index.js 2.4 kB {0} [built]
  [197] ./~/redux-persist/~/lodash.foreach/~/lodash._arrayeach/index.js 942 bytes {0} [built]
  [198] ./~/redux-persist/~/lodash.foreach/~/lodash._baseeach/index.js 5.41 kB {0} [built]
  [199] ./~/redux-persist/~/lodash.foreach/~/lodash._baseeach/~/lodash.keys/index.js 6.62 kB {0} [built]
  [200] ./~/redux-persist/~/lodash.foreach/~/lodash._baseeach/~/lodash.keys/~/lodash._getnative/index.js 3.87 kB {0} [built]
  [201] ./~/redux-persist/~/lodash.foreach/~/lodash._baseeach/~/lodash.keys/~/lodash.isarguments/index.js 6.33 kB {0} [built]
  [202] ./~/redux-persist/~/lodash.foreach/~/lodash.isarray/index.js 5.16 kB {0} [built]
  [203] ./~/redux-persist/~/lodash.foreach/~/lodash._bindcallback/index.js 1.91 kB {0} [built]
  [204] ./~/redux-persist/lib/constants.js 99 bytes {0} [built]
  [205] ./~/redux-persist/lib/getStoredState.js 2.66 kB {0} [built]
  [206] ./~/redux-persist/lib/autoRehydrate.js 3.01 kB {0} [built]
  [207] ./~/redux-persist/~/lodash.isplainobject/index.js 3.24 kB {0} [built]
  [208] ./~/redux-persist/~/lodash.isplainobject/~/lodash._basefor/index.js 1.56 kB {0} [built]
  [209] ./~/redux-persist/~/lodash.isplainobject/~/lodash.isarguments/index.js 6.33 kB {0} [built]
  [210] ./~/redux-persist/~/lodash.isplainobject/~/lodash.keysin/index.js 3.84 kB {0} [built]
  [211] ./~/redux-persist/~/lodash.isplainobject/~/lodash.keysin/~/lodash.isarray/index.js 5.16 kB {0} [built]
  [212] ./~/redux-persist/lib/bufferActions.js 541 bytes {0} [built]
  [213] ./~/chrome-storage-local/storage.js 857 bytes {0} [built]
  [214] ./src/app/store/getStateToBg.js 956 bytes {0} [built]
  [215] ./src/app/store/getStateFromBg.js 714 bytes {0} [built]
  [216] template of 164 referencing  1.72 kB {0} [not cacheable] [built]
[09:42:27] Finished 'webpack:build:electron' after 3.13 s
[09:42:27] Starting 'build:electron'...
[09:42:27] Finished 'build:electron' after 7.6 μs
App threw an error when running [SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode]
zalmoxisus commented 8 years ago

Oh, thanks. I broke it in https://github.com/zalmoxisus/crossbuilder/commit/a4846b8dd7d67d88349d3bd33314fec9aabe7107 by removing 'use strict';

bartonhammond commented 8 years ago

Thanks for the quick response!