Seamless Branch Switching #954

Closed
opened 2018-01-18 17:10:44 +01:00 by kauffj · 0 comments
kauffj commented 2018-01-18 17:10:44 +01:00 (Migrated from github.com)

There are currently issues switching between branches seamlessly. They may be system specific. Here's an example of how switching between branches can cause confusing behavior:

Start on master

Everything works fine:

kauffj@kauffj-T570:~/code/lbry-app$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
kauffj@kauffj-T570:~/code/lbry-app$ ./build.sh 
Building for Linux
Dependencies will NOT be installed. Run with "INSTALL_DEPENDENCIES=true" to install dependencies, or "FULL_BUILD=true" to install dependencies and build a complete app.
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning 7zip-bin-mac@1.0.1: The platform "linux" is incompatible with this module.
info "7zip-bin-mac@1.0.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning 7zip-bin-win@2.1.1: The platform "linux" is incompatible with this module.
info "7zip-bin-win@2.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ electron-builder install-app-deps
electron-builder 19.49.0
Using electron-builder.json configuration file
Using node_modules/electron-webpack/electron-builder.yml configuration file
Rebuilding native production dependencies for linux:x64
Rebuilding native dependency keytar-prebuild
Done in 30.30s.
Grabbing Daemon and CLI
/home/kauffj/code/lbry-app/build/daemon.ver
Already have daemon version 0.18.0, skipping download
Build complete. Run yarn dev to launch the app
kauffj@kauffj-T570:~/code/lbry-app$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
kauffj@kauffj-T570:~/code/lbry-app$ yarn dev
...

Switch Branch

yarn dev does not run properly after switching branches:

kauffj@kauffj-T570:~/code/lbry-app$ git checkout twilio 
Switched to branch 'twilio'
Your branch is up-to-date with 'origin/twilio'.
kauffj@kauffj-T570:~/code/lbry-app$ yarn dev
yarn dev v0.27.5
$ electron-webpack dev

... much output omitted...

┏ Electron -------------------

  App threw an error during load

┗ ----------------------------
┏ Electron -------------------

  Error: Cannot find module 'keytar'
      at Module._resolveFilename (module.js:470:15)
      at Function.Module._resolveFilename (/home/kauffj/code/lbry-app/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
      at Function.Module._load (module.js:418:25)
      at Module.require (module.js:498:17)
      at require (internal/module.js:20:19)
      at eval (webpack-internal:///keytar:1:18)
      at Object.keytar (/home/kauffj/code/lbry-app/dist/main/main.js:845:1)
      at __webpack_require__ (/home/kauffj/code/lbry-app/dist/main/main.js:661:30)
      at fn (/home/kauffj/code/lbry-app/dist/main/main.js:65:20)
      at Object.eval (webpack-internal:///./src/main/index.js:13:65)

┗ ----------------------------
┏ Electron -------------------

  A JavaScript error occurred in the main process
  Uncaught Exception:
  Error: Cannot find module 'keytar'
      at Module._resolveFilename (module.js:470:15)
      at Function.Module._resolveFilename (/home/kauffj/code/lbry-app/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
      at Function.Module._load (module.js:418:25)
      at Module.require (module.js:498:17)
      at require (internal/module.js:20:19)
      at eval (webpack-internal:///keytar:1:18)
      at Object.keytar (/home/kauffj/code/lbry-app/dist/main/main.js:845:1)
      at __webpack_require__ (/home/kauffj/code/lbry-app/dist/main/main.js:661:30)
      at fn (/home/kauffj/code/lbry-app/dist/main/main.js:65:20)
      at Object.eval (webpack-internal:///./src/main/index.js:13:65)

┗ ----------------------------

Next, yarn build

yarn build also fails after switching. Note: I received two different failures when switching.

Original yarn build failure

This failure happened during the original switch and build attempt:

kauffj@kauffj-T570:~/code/lbry-app$ yarn build
yarn build v0.27.5
$ yarn compile && electron-builder build
 54% [0] chunk asset optimization                                                         
/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276
        throw new Error(
              ^
Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
    at SourceMapGenerator_validateMapping [as _validateMapping] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276:15)
    at SourceMapGenerator_addMapping [as addMapping] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:110:12)
    at /home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:72:17
    at Array.forEach (native)
    at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:157:14)
    at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:48:24)
    at SourceMapSource.node (/home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/SourceMapSource.js:32:35)
    at /home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/ConcatSource.js:59:50
    at Array.map (native)
    at ConcatSource.node (/home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/ConcatSource.js:58:63)
    at ConcatSource.proto.sourceAndMap (/home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/SourceAndMapMixin.js:30:18)
    at getTaskForFile (/home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:33:30)
    at chunk.files.forEach.file (/home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:91:21)
    at Array.forEach (native)
    at /home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:89:18
    at Array.forEach (native)
    at Compilation.<anonymous> (/home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:88:12)
    at Compilation.applyPlugins1 (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:75:14)
    at self.applyPluginsAsync.err (/home/kauffj/code/lbry-app/node_modules/webpack/lib/Compilation.js:670:11)
    at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:202:11)
    at Compilation.compilation.plugin (/home/kauffj/code/lbry-app/node_modules/webpack/lib/ProgressPlugin.js:119:6)
    at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:204:14)
    at Compilation.compilation.plugin (/home/kauffj/code/lbry-app/node_modules/webpack/lib/BannerPlugin.js:67:5)
    at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:204:14)
    at Compilation.<anonymous> (/home/kauffj/code/lbry-app/node_modules/babel-minify-webpack-plugin/dist/index.js:119:11)
    at Compilation.applyPluginsAsyncSeries (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:206:13)
    at self.applyPluginsAsync.err (/home/kauffj/code/lbry-app/node_modules/webpack/lib/Compilation.js:666:10)
    at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:202:11)
    at Compilation.compilation.plugin.callback (/home/kauffj/code/lbry-app/node_modules/webpack/lib/ProgressPlugin.js:115:6)
    at Compilation.applyPluginsAsyncSeries (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:206:13)
error Command failed with exit code 1.
error Command failed with exit code 1.

yarn build failure during recreation

This failure happened when I reset everything and tried to recreate this issue:

kauffj@kauffj-T570:~/code/lbry-app$ yarn build
yarn build v0.27.5
$ yarn compile && electron-builder build
[1] Hash: 263fa1ea1b35c540af876717e683bb802fca3fef                                          
Version: webpack 3.10.0
Child
    Hash: 263fa1ea1b35c540af87
    Time: 5857ms
              Asset       Size  Chunks             Chunk Names
        0.bundle.js    1.06 kB       0  [emitted]  
            main.js    8.66 kB       1  [emitted]  main
    0.bundle.js.map  295 bytes       0  [emitted]  
        main.js.map    4.95 kB       1  [emitted]  main
       [1] multi ./src/main/index.js 28 bytes {1} [built]
       [2] ./src/main/index.js + 2 modules 18 kB {1} [built]
        + 11 hidden modules
Child
    Hash: 6717e683bb802fca3fef
    Time: 27566ms
                                    Asset       Size  Chunks                    Chunk Names
      fonts/fontawesome-webfont--font.eot     166 kB          [emitted]         
    fonts/fontawesome-webfont--font.woff2    77.2 kB          [emitted]         
     fonts/fontawesome-webfont--font.woff      98 kB          [emitted]         
      fonts/fontawesome-webfont--font.ttf     166 kB          [emitted]         
       imgs/fontawesome-webfont--font.svg     444 kB          [emitted]  [big]  
                              renderer.js     446 kB       0  [emitted]  [big]  renderer
                               styles.css    70.3 kB       0  [emitted]         renderer
                          renderer.js.map     155 kB       0  [emitted]         renderer
                           styles.css.map   87 bytes       0  [emitted]         renderer
                               index.html  335 bytes          [emitted]         
       [3] ./src/renderer/redux/actions/app.js 8.42 kB {0} [built]
       [5] ./src/renderer/constants/action_types.js 13 kB {0} [built]
       [6] ./src/renderer/redux/actions/navigation.js 2.73 kB {0} [built]
       [9] ./src/renderer/lbry.js 10.1 kB {0} [built]
      [29] ./src/renderer/redux/actions/user.js 8.5 kB {0} [built]
      [37] ./src/renderer/redux/actions/settings.js 4.55 kB {0} [built]
      [74] ./src/renderer/app.js 1.3 kB {0} [built]
      [75] ./src/renderer/store.js 5.17 kB {0} [built]
      [85] multi ./src/renderer/index.js 28 bytes {0} [built]
      [86] ./src/renderer/index.js 5.95 kB {0} [built]
      [88] ./src/renderer/component/app/index.js 1.28 kB {0} [built]
     [183] ./src/renderer/redux/reducers/settings.js 3.61 kB {0} [built]
     [287] ./src/renderer/component/snackBar/index.js 820 bytes {0} [built]
     [289] ./src/renderer/component/splash/index.js 901 bytes {0} [built]
     [294] ./src/renderer/scss/all.scss 41 bytes {0} [built]
        + 292 hidden modules
    Child html-webpack-plugin for "index.html":
         1 asset
           [0] ./node_modules/html-loader?minimize=false!/__virtual__/renderer-index.html 278 bytes {0} [built]
    Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!node_modules/react-simplemde-editor/dist/simplemde.min.css:
           2 modules
    Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!node_modules/sass-loader/lib/loader.js!src/renderer/scss/all.scss:
         5 assets
           [0] ./static/img/busy.gif 1.73 kB {0} [built]
           [1] ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/renderer/scss/all.scss 58.4 kB {0} [built]
           [3] ./static/font/fontawesome-webfont.eot?v=4.7.0 81 bytes {0} [built]
           [4] ./static/font/fontawesome-webfont.eot 81 bytes {0} [built]
           [5] ./static/font/fontawesome-webfont.woff2?v=4.7.0 83 bytes {0} [built]
           [6] ./static/font/fontawesome-webfont.woff?v=4.7.0 82 bytes {0} [built]
           [7] ./static/font/fontawesome-webfont.ttf?v=4.7.0 81 bytes {0} [built]
           [8] ./static/font/fontawesome-webfont.svg?v=4.7.0 80 bytes {0} [built]
            + 1 hidden module
Extracted all strings!
electron-builder 19.49.0
Using electron-builder.json configuration file
Using node_modules/electron-webpack/electron-builder.yml configuration file
Error: Unresolved node modules: keytar
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:112:19
From previous event:
    at Collector.resolveUnresolvedHoisted (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/packageDependencies.js:208:11)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:88:18
    at Generator.next (<anonymous>)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Collector.collect (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/packageDependencies.js:156:11)
    at computeDependencies (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:51:26)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:46:28
    at Generator.next (<anonymous>)
From previous event:
    at getProductionDependencies (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/packageDependencies.js:29:21)
    at Lazy [as creator] (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:40:25)
    at Lazy.get value [as value] (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/node_modules/lazy-val/src/main.ts:18:23)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/yarn.ts:120:65
    at Generator.next (<anonymous>)
From previous event:
    at rebuild (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/yarn.js:93:22)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/yarn.ts:20:11
    at Generator.next (<anonymous>)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at installOrRebuild (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/yarn.js:31:21)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:423:7
    at Generator.next (<anonymous>)
From previous event:
    at Packager.installAppDependencies (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:471:11)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:337:20
    at Generator.next (<anonymous>)
From previous event:
    at Packager.doBuild (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:407:11)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:289:52
From previous event:
    at Packager._build (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:351:11)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:259:23
    at Generator.next (<anonymous>)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Packager.build (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:311:11)
    at /home/kauffj/code/lbry-app/node_modules/electron-builder/src/builder.ts:287:40
    at Generator.next (<anonymous>)
From previous event:
    at _build (/home/kauffj/code/lbry-app/node_modules/electron-builder/out/builder.js:61:21)
    at build (/home/kauffj/code/lbry-app/node_modules/electron-builder/src/builder.ts:257:10)
    at then (/home/kauffj/code/lbry-app/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Object.args [as handler] (/home/kauffj/code/lbry-app/node_modules/electron-builder/out/cli/cli.js:127:117)
    at Object.runCommand (/home/kauffj/code/lbry-app/node_modules/yargs/lib/command.js:228:22)
    at Object.parseArgs [as _parseArgs] (/home/kauffj/code/lbry-app/node_modules/yargs/yargs.js:1013:30)
    at Object.get [as argv] (/home/kauffj/code/lbry-app/node_modules/yargs/yargs.js:957:21)
    at Object.<anonymous> (/home/kauffj/code/lbry-app/node_modules/electron-builder/out/cli/cli.js:123:441)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
error Command failed with exit code 1.

build.sh works fine

After running build.sh, everything works properly. Here's the output from build.sh:

kauffj@kauffj-T570:~/code/lbry-app$ ./build.sh 
Building for Linux
Dependencies will NOT be installed. Run with "INSTALL_DEPENDENCIES=true" to install dependencies, or "FULL_BUILD=true" to install dependencies and build a complete app.
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning 7zip-bin-mac@1.0.1: The platform "linux" is incompatible with this module.
info "7zip-bin-mac@1.0.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning 7zip-bin-win@2.1.1: The platform "linux" is incompatible with this module.
info "7zip-bin-win@2.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
warning fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ electron-builder install-app-deps
electron-builder 19.49.0
Using electron-builder.json configuration file
Using node_modules/electron-webpack/electron-builder.yml configuration file
Rebuilding native production dependencies for linux:x64
Rebuilding native dependency keytar
Done in 18.26s.
Grabbing Daemon and CLI
/home/kauffj/code/lbry-app/build/daemon.ver
Already have daemon version 0.18.0, skipping download
Build complete. Run yarn dev to launch the app
There are currently issues switching between branches seamlessly. They may be system specific. Here's an example of how switching between branches can cause confusing behavior: ### Start on master Everything works fine: ``` kauffj@kauffj-T570:~/code/lbry-app$ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean kauffj@kauffj-T570:~/code/lbry-app$ ./build.sh Building for Linux Dependencies will NOT be installed. Run with "INSTALL_DEPENDENCIES=true" to install dependencies, or "FULL_BUILD=true" to install dependencies and build a complete app. yarn install v0.27.5 [1/4] Resolving packages... [2/4] Fetching packages... warning 7zip-bin-mac@1.0.1: The platform "linux" is incompatible with this module. info "7zip-bin-mac@1.0.1" is an optional dependency and failed compatibility check. Excluding it from installation. warning 7zip-bin-win@2.1.1: The platform "linux" is incompatible with this module. info "7zip-bin-win@2.1.1" is an optional dependency and failed compatibility check. Excluding it from installation. warning fsevents@1.1.3: The platform "linux" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... $ electron-builder install-app-deps electron-builder 19.49.0 Using electron-builder.json configuration file Using node_modules/electron-webpack/electron-builder.yml configuration file Rebuilding native production dependencies for linux:x64 Rebuilding native dependency keytar-prebuild Done in 30.30s. Grabbing Daemon and CLI /home/kauffj/code/lbry-app/build/daemon.ver Already have daemon version 0.18.0, skipping download Build complete. Run yarn dev to launch the app kauffj@kauffj-T570:~/code/lbry-app$ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean kauffj@kauffj-T570:~/code/lbry-app$ yarn dev ... ``` ### Switch Branch `yarn dev` does not run properly after switching branches: ``` kauffj@kauffj-T570:~/code/lbry-app$ git checkout twilio Switched to branch 'twilio' Your branch is up-to-date with 'origin/twilio'. kauffj@kauffj-T570:~/code/lbry-app$ yarn dev yarn dev v0.27.5 $ electron-webpack dev ... much output omitted... ┏ Electron ------------------- App threw an error during load ┗ ---------------------------- ┏ Electron ------------------- Error: Cannot find module 'keytar' at Module._resolveFilename (module.js:470:15) at Function.Module._resolveFilename (/home/kauffj/code/lbry-app/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at eval (webpack-internal:///keytar:1:18) at Object.keytar (/home/kauffj/code/lbry-app/dist/main/main.js:845:1) at __webpack_require__ (/home/kauffj/code/lbry-app/dist/main/main.js:661:30) at fn (/home/kauffj/code/lbry-app/dist/main/main.js:65:20) at Object.eval (webpack-internal:///./src/main/index.js:13:65) ┗ ---------------------------- ┏ Electron ------------------- A JavaScript error occurred in the main process Uncaught Exception: Error: Cannot find module 'keytar' at Module._resolveFilename (module.js:470:15) at Function.Module._resolveFilename (/home/kauffj/code/lbry-app/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at eval (webpack-internal:///keytar:1:18) at Object.keytar (/home/kauffj/code/lbry-app/dist/main/main.js:845:1) at __webpack_require__ (/home/kauffj/code/lbry-app/dist/main/main.js:661:30) at fn (/home/kauffj/code/lbry-app/dist/main/main.js:65:20) at Object.eval (webpack-internal:///./src/main/index.js:13:65) ┗ ---------------------------- ``` ### Next, yarn build `yarn build` also fails after switching. Note: I received two different failures when switching. #### Original yarn build failure This failure happened during the original switch and build attempt: ``` kauffj@kauffj-T570:~/code/lbry-app$ yarn build yarn build v0.27.5 $ yarn compile && electron-builder build 54% [0] chunk asset optimization /home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276 throw new Error( ^ Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values. at SourceMapGenerator_validateMapping [as _validateMapping] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:276:15) at SourceMapGenerator_addMapping [as addMapping] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:110:12) at /home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:72:17 at Array.forEach (native) at BasicSourceMapConsumer.SourceMapConsumer_eachMapping [as eachMapping] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-consumer.js:157:14) at Function.SourceMapGenerator_fromSourceMap [as fromSourceMap] (/home/kauffj/code/lbry-app/node_modules/webpack-sources/node_modules/source-map/lib/source-map-generator.js:48:24) at SourceMapSource.node (/home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/SourceMapSource.js:32:35) at /home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/ConcatSource.js:59:50 at Array.map (native) at ConcatSource.node (/home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/ConcatSource.js:58:63) at ConcatSource.proto.sourceAndMap (/home/kauffj/code/lbry-app/node_modules/webpack-sources/lib/SourceAndMapMixin.js:30:18) at getTaskForFile (/home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:33:30) at chunk.files.forEach.file (/home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:91:21) at Array.forEach (native) at /home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:89:18 at Array.forEach (native) at Compilation.<anonymous> (/home/kauffj/code/lbry-app/node_modules/webpack/lib/SourceMapDevToolPlugin.js:88:12) at Compilation.applyPlugins1 (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:75:14) at self.applyPluginsAsync.err (/home/kauffj/code/lbry-app/node_modules/webpack/lib/Compilation.js:670:11) at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:202:11) at Compilation.compilation.plugin (/home/kauffj/code/lbry-app/node_modules/webpack/lib/ProgressPlugin.js:119:6) at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:204:14) at Compilation.compilation.plugin (/home/kauffj/code/lbry-app/node_modules/webpack/lib/BannerPlugin.js:67:5) at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:204:14) at Compilation.<anonymous> (/home/kauffj/code/lbry-app/node_modules/babel-minify-webpack-plugin/dist/index.js:119:11) at Compilation.applyPluginsAsyncSeries (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:206:13) at self.applyPluginsAsync.err (/home/kauffj/code/lbry-app/node_modules/webpack/lib/Compilation.js:666:10) at next (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:202:11) at Compilation.compilation.plugin.callback (/home/kauffj/code/lbry-app/node_modules/webpack/lib/ProgressPlugin.js:115:6) at Compilation.applyPluginsAsyncSeries (/home/kauffj/code/lbry-app/node_modules/tapable/lib/Tapable.js:206:13) error Command failed with exit code 1. error Command failed with exit code 1. ``` #### yarn build failure during recreation This failure happened when I reset everything and tried to recreate this issue: ``` kauffj@kauffj-T570:~/code/lbry-app$ yarn build yarn build v0.27.5 $ yarn compile && electron-builder build [1] Hash: 263fa1ea1b35c540af876717e683bb802fca3fef Version: webpack 3.10.0 Child Hash: 263fa1ea1b35c540af87 Time: 5857ms Asset Size Chunks Chunk Names 0.bundle.js 1.06 kB 0 [emitted] main.js 8.66 kB 1 [emitted] main 0.bundle.js.map 295 bytes 0 [emitted] main.js.map 4.95 kB 1 [emitted] main [1] multi ./src/main/index.js 28 bytes {1} [built] [2] ./src/main/index.js + 2 modules 18 kB {1} [built] + 11 hidden modules Child Hash: 6717e683bb802fca3fef Time: 27566ms Asset Size Chunks Chunk Names fonts/fontawesome-webfont--font.eot 166 kB [emitted] fonts/fontawesome-webfont--font.woff2 77.2 kB [emitted] fonts/fontawesome-webfont--font.woff 98 kB [emitted] fonts/fontawesome-webfont--font.ttf 166 kB [emitted] imgs/fontawesome-webfont--font.svg 444 kB [emitted] [big] renderer.js 446 kB 0 [emitted] [big] renderer styles.css 70.3 kB 0 [emitted] renderer renderer.js.map 155 kB 0 [emitted] renderer styles.css.map 87 bytes 0 [emitted] renderer index.html 335 bytes [emitted] [3] ./src/renderer/redux/actions/app.js 8.42 kB {0} [built] [5] ./src/renderer/constants/action_types.js 13 kB {0} [built] [6] ./src/renderer/redux/actions/navigation.js 2.73 kB {0} [built] [9] ./src/renderer/lbry.js 10.1 kB {0} [built] [29] ./src/renderer/redux/actions/user.js 8.5 kB {0} [built] [37] ./src/renderer/redux/actions/settings.js 4.55 kB {0} [built] [74] ./src/renderer/app.js 1.3 kB {0} [built] [75] ./src/renderer/store.js 5.17 kB {0} [built] [85] multi ./src/renderer/index.js 28 bytes {0} [built] [86] ./src/renderer/index.js 5.95 kB {0} [built] [88] ./src/renderer/component/app/index.js 1.28 kB {0} [built] [183] ./src/renderer/redux/reducers/settings.js 3.61 kB {0} [built] [287] ./src/renderer/component/snackBar/index.js 820 bytes {0} [built] [289] ./src/renderer/component/splash/index.js 901 bytes {0} [built] [294] ./src/renderer/scss/all.scss 41 bytes {0} [built] + 292 hidden modules Child html-webpack-plugin for "index.html": 1 asset [0] ./node_modules/html-loader?minimize=false!/__virtual__/renderer-index.html 278 bytes {0} [built] Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!node_modules/react-simplemde-editor/dist/simplemde.min.css: 2 modules Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js!node_modules/sass-loader/lib/loader.js!src/renderer/scss/all.scss: 5 assets [0] ./static/img/busy.gif 1.73 kB {0} [built] [1] ./node_modules/css-loader!./node_modules/sass-loader/lib/loader.js!./src/renderer/scss/all.scss 58.4 kB {0} [built] [3] ./static/font/fontawesome-webfont.eot?v=4.7.0 81 bytes {0} [built] [4] ./static/font/fontawesome-webfont.eot 81 bytes {0} [built] [5] ./static/font/fontawesome-webfont.woff2?v=4.7.0 83 bytes {0} [built] [6] ./static/font/fontawesome-webfont.woff?v=4.7.0 82 bytes {0} [built] [7] ./static/font/fontawesome-webfont.ttf?v=4.7.0 81 bytes {0} [built] [8] ./static/font/fontawesome-webfont.svg?v=4.7.0 80 bytes {0} [built] + 1 hidden module Extracted all strings! electron-builder 19.49.0 Using electron-builder.json configuration file Using node_modules/electron-webpack/electron-builder.yml configuration file Error: Unresolved node modules: keytar at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:112:19 From previous event: at Collector.resolveUnresolvedHoisted (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/packageDependencies.js:208:11) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:88:18 at Generator.next (<anonymous>) at runCallback (timers.js:781:20) at tryOnImmediate (timers.js:743:5) at processImmediate [as _immediateCallback] (timers.js:714:5) From previous event: at Collector.collect (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/packageDependencies.js:156:11) at computeDependencies (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:51:26) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:46:28 at Generator.next (<anonymous>) From previous event: at getProductionDependencies (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/packageDependencies.js:29:21) at Lazy [as creator] (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/packageDependencies.ts:40:25) at Lazy.get value [as value] (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/node_modules/lazy-val/src/main.ts:18:23) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/yarn.ts:120:65 at Generator.next (<anonymous>) From previous event: at rebuild (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/yarn.js:93:22) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/util/yarn.ts:20:11 at Generator.next (<anonymous>) at runCallback (timers.js:781:20) at tryOnImmediate (timers.js:743:5) at processImmediate [as _immediateCallback] (timers.js:714:5) From previous event: at installOrRebuild (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/util/yarn.js:31:21) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:423:7 at Generator.next (<anonymous>) From previous event: at Packager.installAppDependencies (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:471:11) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:337:20 at Generator.next (<anonymous>) From previous event: at Packager.doBuild (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:407:11) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:289:52 From previous event: at Packager._build (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:351:11) at /home/kauffj/code/lbry-app/node_modules/electron-builder-lib/src/packager.ts:259:23 at Generator.next (<anonymous>) at runCallback (timers.js:781:20) at tryOnImmediate (timers.js:743:5) at processImmediate [as _immediateCallback] (timers.js:714:5) From previous event: at Packager.build (/home/kauffj/code/lbry-app/node_modules/electron-builder-lib/out/packager.js:311:11) at /home/kauffj/code/lbry-app/node_modules/electron-builder/src/builder.ts:287:40 at Generator.next (<anonymous>) From previous event: at _build (/home/kauffj/code/lbry-app/node_modules/electron-builder/out/builder.js:61:21) at build (/home/kauffj/code/lbry-app/node_modules/electron-builder/src/builder.ts:257:10) at then (/home/kauffj/code/lbry-app/node_modules/electron-builder/src/cli/cli.ts:49:4) at runCallback (timers.js:781:20) at tryOnImmediate (timers.js:743:5) at processImmediate [as _immediateCallback] (timers.js:714:5) From previous event: at Object.args [as handler] (/home/kauffj/code/lbry-app/node_modules/electron-builder/out/cli/cli.js:127:117) at Object.runCommand (/home/kauffj/code/lbry-app/node_modules/yargs/lib/command.js:228:22) at Object.parseArgs [as _parseArgs] (/home/kauffj/code/lbry-app/node_modules/yargs/yargs.js:1013:30) at Object.get [as argv] (/home/kauffj/code/lbry-app/node_modules/yargs/yargs.js:957:21) at Object.<anonymous> (/home/kauffj/code/lbry-app/node_modules/electron-builder/out/cli/cli.js:123:441) at Module._compile (module.js:569:30) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:503:32) at tryModuleLoad (module.js:466:12) at Function.Module._load (module.js:458:3) at Function.Module.runMain (module.js:605:10) at startup (bootstrap_node.js:158:16) at bootstrap_node.js:575:3 error Command failed with exit code 1. ``` ### build.sh works fine After running `build.sh`, everything works properly. Here's the output from `build.sh`: ``` kauffj@kauffj-T570:~/code/lbry-app$ ./build.sh Building for Linux Dependencies will NOT be installed. Run with "INSTALL_DEPENDENCIES=true" to install dependencies, or "FULL_BUILD=true" to install dependencies and build a complete app. yarn install v0.27.5 [1/4] Resolving packages... [2/4] Fetching packages... warning 7zip-bin-mac@1.0.1: The platform "linux" is incompatible with this module. info "7zip-bin-mac@1.0.1" is an optional dependency and failed compatibility check. Excluding it from installation. warning 7zip-bin-win@2.1.1: The platform "linux" is incompatible with this module. info "7zip-bin-win@2.1.1" is an optional dependency and failed compatibility check. Excluding it from installation. warning fsevents@1.1.3: The platform "linux" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [3/4] Linking dependencies... [4/4] Building fresh packages... $ electron-builder install-app-deps electron-builder 19.49.0 Using electron-builder.json configuration file Using node_modules/electron-webpack/electron-builder.yml configuration file Rebuilding native production dependencies for linux:x64 Rebuilding native dependency keytar Done in 18.26s. Grabbing Daemon and CLI /home/kauffj/code/lbry-app/build/daemon.ver Already have daemon version 0.18.0, skipping download Build complete. Run yarn dev to launch the app ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LBRYCommunity/lbry-desktop#954
No description provided.