Fix lbrynet not starting #2344

Merged
skhameneh merged 3 commits from fix-lbrynet into master 2019-03-16 05:07:15 +01:00
4 changed files with 9 additions and 5 deletions
Showing only changes of commit de51d8fc19 - Show all commits

View file

@ -45,7 +45,7 @@
"electron-log": "^2.2.12",
"electron-updater": "^4.0.6",
"express": "^4.16.4",
"keytar": "4.4.1"
"keytar": "^4.4.1"
},
"devDependencies": {
"@babel/core": "^7.0.0",
@ -100,7 +100,6 @@
"hast-util-sanitize": "^1.1.2",
"husky": "^0.14.3",
"json-loader": "^0.5.4",
"keytar": "4.4.1",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#2a7e05940f892f104428eeb37bd1f178da811a09",
"lbryinc": "lbryio/lbryinc#351d0a08806b0f770b50066b61a806171f6424d4",

View file

@ -4,7 +4,9 @@ import { spawn, execSync } from 'child_process';
import { Lbry } from 'lbry-redux';
export default class Daemon {
static path = process.env.LBRY_DAEMON || path.join(process.resourcesPath, 'static', 'lbrynet');
static path = process.env.LBRY_DAEMON || (
process.env.NODE_ENV === 'production' ? path.join(process.resourcesPath, 'static', 'lbrynet') : path.join(__static, 'lbrynet')
);
subprocess;
handlers;

View file

@ -60,7 +60,10 @@ if (process.env.NODE_ENV === 'production') {
const nodeExternals = require('webpack-node-externals');
// Apply dev overrides
mainConfig = merge(mainConfig, {
externals: [nodeExternals()],
externals: {
keytar: 'require("keytar")',
electron: 'require("electron")',
},
});
}

View file

@ -5982,7 +5982,7 @@ kebab-case@^1.0.0:
resolved "https://registry.yarnpkg.com/kebab-case/-/kebab-case-1.0.0.tgz#3f9e4990adcad0c686c0e701f7645868f75f91eb"
integrity sha1-P55JkK3K0MaGwOcB92RYaPdfkes=
keytar@4.4.1:
keytar@^4.4.1:
version "4.4.1"
resolved "https://registry.yarnpkg.com/keytar/-/keytar-4.4.1.tgz#156af8a9b016bf118ee9948b02418c81d760a5ba"
integrity sha512-6xEe7ybXSR5EZC+z0GI2yqLYZjV1tyPQY2xSZ8rGsBxrrLEh8VR/Lfqv59uGX+I+W+OZxH0jCXN1dU1++ify4g==