pavlobu / deskreen

Deskreen turns any device with a web browser into a secondary screen for your computer. ⭐️ Star to support our work!
https://deskreen.com
GNU Affero General Public License v3.0
17.56k stars 962 forks source link

Build from source fails. #181

Open RafayAK opened 2 years ago

RafayAK commented 2 years ago

Prerequisites

Expected Behavior

Running the command cd app/client; yarn install --frozen-lockfile ; cd ../../ ; yarn install --frozen-lockfile should build the app, it fails

Current Behavior

deskreen $ cd app/client; yarn install --frozen-lockfile ; cd ../../ ; yarn install --frozen-lockfile
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @testing-library/user-event@7.2.1" has unmet peer dependency "@testing-library/dom@>=5".
warning " > react-test-renderer@17.0.1" has incorrect peer dependency "react@17.0.1".
[4/4] Building fresh packages...
Done in 50.87s.
yarn install v1.22.17
$ node ./internals/scripts/CheckYarn.js
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > connected-react-router@6.8.0" has unmet peer dependency "immutable@^3.8.1 || ^4.0.0-rc.1".
warning " > connected-react-router@6.8.0" has unmet peer dependency "react-router@^4.3.1 || ^5.0.0".
warning " > connected-react-router@6.8.0" has unmet peer dependency "seamless-immutable@^7.1.3".
warning " > browserslist-config-erb@0.0.1" has incorrect peer dependency "electron@^7.0.0".
warning " > eslint-config-airbnb@18.2.1" has incorrect peer dependency "eslint-plugin-jsx-a11y@^6.4.1".
warning " > eslint-config-erb@1.0.0" has incorrect peer dependency "eslint-config-airbnb-typescript@^8.0.2".
warning " > eslint-config-erb@1.0.0" has unmet peer dependency "eslint-plugin-flowtype@^5.1.3".
warning " > eslint-config-erb@1.0.0" has incorrect peer dependency "eslint-plugin-jsx-a11y@6.2.3".
[4/4] Building fresh packages...
$ node -r @babel/register internals/scripts/CheckNativeDep.js && electron-builder install-app-deps && yarn build-dll && opencollective-postinstall
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

 Webpack does not work with native dependencies.
@blueprintjs/core, @blueprintjs/select, @fortawesome/fontawesome-free, @hot-loader/react-dom, @material-ui/core, @reduxjs/toolkit, axios, classnames, clsx, connected-react-router, electron-debug, electron-log, electron-settings, electron-updater, electron, express, fontsource-lexend-peta, get-port, history, i18next-fs-backend, i18next-node-fs-backend, i18next-sync-fs-backend, i18next, internal-ip, kcors, koa-router, koa-send, koa-static, koa, node-forge, qrcode.react, react-awesome-reveal, react-dom, react-flexbox-grid, react-hot-loader, react-i18next, react-qrcode-logo, react-redux, react-reveal, react-router-dom, react-toast-notifications, react-toastify, react, redux-thunk, redux, regenerator-runtime, shortid, simple-peer, socket.io-client, socket.io, source-map-support, winston are native dependencies and should be installed inside of the "./app" folder.
 First, uninstall the packages from "./package.json":
yarn remove your-package
 Then, instead of installing the package to the root "./package.json":
yarn add your-package
 Install the package to "./app/package.json"
cd ./app && yarn add your-package
 Read more about native dependencies at:
https://electron-react-boilerplate.js.org/docs/adding-dependencies/#module-structure

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

build from source fails

Steps to Reproduce

clone repository and build using the command: cd app/client; yarn install --frozen-lockfile ; cd ../../ ; yarn install --frozen-lockfile

Possible Solution (Not obligatory)

Context

I'm trying to implement some sort of Wayland support into Deskreen

No

Your Environment

seffs commented 2 years ago

I remember seeing something like this in my first attempts, but it didn't really affect the build itself. It must be something related to the outdated dependencies. Try re-cloning the project and run:

cd app/client; yarn install --frozen-lockfile ; cd ../../ ; yarn install --frozen-lockfile; cd app/; yarn install --frozen-lockfile; cd ../; yarn dev

chris0203 commented 1 month ago

Same error here when running yarn install --frozen-lockfile; cd ../; yarn dev

Node: v20.18.0

yarn dev
yarn run v1.22.22
$ cross-env START_HOT=1 node -r @babel/register ./internals/scripts/CheckPortInUse.js && concurrently "cross-env START_HOT=1 RUN_MODE=dev yarn start-renderer-dev" "yarn start-client-dev"
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
$ cd app/client && cross-env SKIP_PREFLIGHT_CHECK=true yarn start
$ cross-env START_HOT=1 NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js
$ react-scripts start
[0] Browserslist: caniuse-lite is outdated. Please run:
[0] npx browserslist@latest --update-db
[0]
[0] Why you should do it regularly:
[0] https://github.com/browserslist/browserslist#browsers-data-updating
[0] The DLL files are missing. Sit back while we build them for you with "yarn build-dll"
[1] i 「wds」: Project is running at http://192.168.88.33/
[1] i 「wds」: webpack output is served from
[1] i 「wds」: Content not from webpack is served from C:\Users\Chris.Wong\Projects\deskreen\app\client\public
[1] i 「wds」: 404s will fallback to /
[1] Starting the development server...
[1]
[1] Error: error:0308010C:digital envelope routines::unsupported
[1]     at new Hash (node:internal/crypto/hash:79:19)
[1]     at Object.createHash (node:crypto:139:10)
[1]     at module.exports (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\util\createHash.js:135:53)
[1]     at NormalModule._initBuildHash (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\NormalModule.js:417:16)
[1]     at handleParseError (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\NormalModule.js:471:10)
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\NormalModule.js:503:5
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\NormalModule.js:358:12
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\loader-runner\lib\LoaderRunner.js:373:3
[1]     at iterateNormalLoaders (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
[1]     at iterateNormalLoaders (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
[1] C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\react-scripts\scripts\start.js:19
[1]   throw err;
[1]   ^
[1]
[1] Error: error:0308010C:digital envelope routines::unsupported
[1]     at new Hash (node:internal/crypto/hash:79:19)
[1]     at Object.createHash (node:crypto:139:10)
[1]     at module.exports (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\util\createHash.js:135:53)
[1]     at NormalModule._initBuildHash (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\NormalModule.js:417:16)
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\NormalModule.js:452:10
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\webpack\lib\NormalModule.js:323:13
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\loader-runner\lib\LoaderRunner.js:367:11
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\loader-runner\lib\LoaderRunner.js:233:18
[1]     at context.callback (C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
[1]     at C:\Users\Chris.Wong\Projects\deskreen\app\client\node_modules\react-scripts\node_modules\babel-loader\lib\index.js:59:103 {
[1]   opensslErrorStack: [
[1]     'error:03000086:digital envelope routines::initialization error',
[1]     'error:0308010C:digital envelope routines::unsupported'
[1]   ],
[1]   library: 'digital envelope routines',
[1]   reason: 'unsupported',
[1]   code: 'ERR_OSSL_EVP_UNSUPPORTED'
[1] }
[1]
[1] Node.js v20.18.0
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[1] yarn start-client-dev exited with code 1
[0] Browserslist: caniuse-lite is outdated. Please run:
[0] npx browserslist@latest --update-db
[0]
[0] Why you should do it regularly:
[0] https://github.com/browserslist/browserslist#browsers-data-updating
[0] node:internal/crypto/hash:79
[0]   this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
[0]                   ^
[0]
[0] Error: error:0308010C:digital envelope routines::unsupported
[0]     at new Hash (node:internal/crypto/hash:79:19)
[0]     at Object.createHash (node:crypto:139:10)
[0]     at module.exports (C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\util\createHash.js:135:53)
[0]     at NormalModule._initBuildHash (C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:417:16)
[0]     at handleParseError (C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:471:10)
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:503:5
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:358:12
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\loader-runner\lib\LoaderRunner.js:373:3
[0]     at iterateNormalLoaders (C:\Users\Chris.Wong\Projects\deskreen\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
[0]     at Array.<anonymous> (C:\Users\Chris.Wong\Projects\deskreen\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
[0]     at Storage.finished (C:\Users\Chris.Wong\Projects\deskreen\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\graceful-fs\graceful-fs.js:123:16
[0]     at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) {
[0]   opensslErrorStack: [
[0]     'error:03000086:digital envelope routines::initialization error',
[0]     'error:0308010C:digital envelope routines::unsupported'
[0]   ],
[0]   library: 'digital envelope routines',
[0]   reason: 'unsupported',
[0]   code: 'ERR_OSSL_EVP_UNSUPPORTED'
[0] }
[0]
[0] Node.js v20.18.0
error Command failed with exit code 1.
[0] node:child_process:966
[0]     throw err;
[0]     ^
[0]
[0] Error: Command failed: yarn build-dll
[0] Browserslist: caniuse-lite is outdated. Please run:
[0] npx browserslist@latest --update-db
[0]
[0] Why you should do it regularly:
[0] https://github.com/browserslist/browserslist#browsers-data-updating
[0] node:internal/crypto/hash:79
[0]   this[kHandle] = new _Hash(algorithm, xofLen, algorithmId, getHashCache());
[0]                   ^
[0]
[0] Error: error:0308010C:digital envelope routines::unsupported
[0]     at new Hash (node:internal/crypto/hash:79:19)
[0]     at Object.createHash (node:crypto:139:10)
[0]     at module.exports (C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\util\createHash.js:135:53)
[0]     at NormalModule._initBuildHash (C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:417:16)
[0]     at handleParseError (C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:471:10)
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:503:5
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\webpack\lib\NormalModule.js:358:12
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\loader-runner\lib\LoaderRunner.js:373:3
[0]     at iterateNormalLoaders (C:\Users\Chris.Wong\Projects\deskreen\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
[0]     at Array.<anonymous> (C:\Users\Chris.Wong\Projects\deskreen\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
[0]     at Storage.finished (C:\Users\Chris.Wong\Projects\deskreen\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
[0]     at C:\Users\Chris.Wong\Projects\deskreen\node_modules\graceful-fs\graceful-fs.js:123:16
[0]     at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3) {
[0]   opensslErrorStack: [
[0]     'error:03000086:digital envelope routines::initialization error',
[0]     'error:0308010C:digital envelope routines::unsupported'
[0]   ],
[0]   library: 'digital envelope routines',
[0]   reason: 'unsupported',
[0]   code: 'ERR_OSSL_EVP_UNSUPPORTED'
[0] }
[0]
[0] Node.js v20.18.0
error Command failed with exit code 1.
[0]
[0]     at genericNodeError (node:internal/errors:984:15)
[0]     at wrappedFn (node:internal/errors:538:14)
[0]     at checkExecSyncError (node:child_process:891:11)
[0]     at execSync (node:child_process:963:15)
[0]     at Object.<anonymous> (C:\Users\Chris.Wong\Projects\deskreen\configs\/webpack.config.renderer.dev.babel.js:40:3)
[0]     at Module._compile (node:internal/modules/cjs/loader:1469:14)
[0]     at Module._compile (C:\Users\Chris.Wong\Projects\deskreen\node_modules\pirates\lib\index.js:99:24)
[0]     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
[0]     at Object.newLoader [as .js] (C:\Users\Chris.Wong\Projects\deskreen\node_modules\pirates\lib\index.js:104:7)
[0]     at Module.load (node:internal/modules/cjs/loader:1288:32) {
[0]   status: 1,
[0]   signal: null,
[0]   output: [
[0]     null,
[0]     Buffer(239) [Uint8Array] [
[0]        27,  91,  50,  75,  27,  91,  49,  71,  27,  91,  50, 109,
[0]        36,  32,  99, 114, 111, 115, 115,  45, 101, 110, 118,  32,
[0]        78,  79,  68,  69,  95,  69,  78,  86,  61, 100, 101, 118,
[0]       101, 108, 111, 112, 109, 101, 110, 116,  32, 119, 101,  98,
[0]       112,  97,  99, 107,  32,  45,  45,  99, 111, 110, 102, 105,
[0]       103,  32,  46,  47,  99, 111, 110, 102, 105, 103, 115,  47,
[0]       119, 101,  98, 112,  97,  99, 107,  46,  99, 111, 110, 102,
[0]       105, 103,  46, 114, 101, 110, 100, 101, 114, 101, 114,  46,
[0]       100, 101, 118,  46,
[0]       ... 139 more items
[0]     ],
[0]     Buffer(2482) [Uint8Array] [
[0]        66, 114, 111, 119, 115, 101, 114, 115, 108, 105, 115, 116,
[0]        58,  32,  99,  97, 110, 105, 117, 115, 101,  45, 108, 105,
[0]       116, 101,  32, 105, 115,  32, 111, 117, 116, 100,  97, 116,
[0]       101, 100,  46,  32,  80, 108, 101,  97, 115, 101,  32, 114,
[0]       117, 110,  58,  10, 110, 112, 120,  32,  98, 114, 111, 119,
[0]       115, 101, 114, 115, 108, 105, 115, 116,  64, 108,  97, 116,
[0]       101, 115, 116,  32,  45,  45, 117, 112, 100,  97, 116, 101,
[0]        45, 100,  98,  10,  10,  87, 104, 121,  32, 121, 111, 117,
[0]        32, 115, 104, 111,
[0]       ... 2382 more items
[0]     ]
[0]   ],
[0]   pid: 28840,
[0]   stdout: Buffer(239) [Uint8Array] [
[0]      27,  91,  50,  75,  27,  91,  49,  71,  27,  91,  50, 109,
[0]      36,  32,  99, 114, 111, 115, 115,  45, 101, 110, 118,  32,
[0]      78,  79,  68,  69,  95,  69,  78,  86,  61, 100, 101, 118,
[0]     101, 108, 111, 112, 109, 101, 110, 116,  32, 119, 101,  98,
[0]     112,  97,  99, 107,  32,  45,  45,  99, 111, 110, 102, 105,
[0]     103,  32,  46,  47,  99, 111, 110, 102, 105, 103, 115,  47,
[0]     119, 101,  98, 112,  97,  99, 107,  46,  99, 111, 110, 102,
    105, 103,  46, 114, 101, 110, 100, 101, 114, 101, 114,  46,
[0]     100, 101, 118,  46,
[0]     ... 139 more items
[0]   ],
[0]   stderr: Buffer(2482) [Uint8Array] [
[0]      66, 114, 111, 119, 115, 101, 114, 115, 108, 105, 115, 116,
[0]      58,  32,  99,  97, 110, 105, 117, 115, 101,  45, 108, 105,
[0]     116, 101,  32, 105, 115,  32, 111, 117, 116, 100,  97, 116,
[0]     101, 100,  46,  32,  80, 108, 101,  97, 115, 101,  32, 114,
[0]     117, 110,  58,  10, 110, 112, 120,  32,  98, 114, 111, 119,
[0]     115, 101, 114, 115, 108, 105, 115, 116,  64, 108,  97, 116,
[0]     101, 115, 116,  32,  45,  45, 117, 112, 100,  97, 116, 101,
[0]      45, 100,  98,  10,  10,  87, 104, 121,  32, 121, 111, 117,
[0]      32, 115, 104, 111,
[0]     ... 2382 more items
[0]   ]
[0] }
[0]
[0] Node.js v20.18.0
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[0] error Command failed with exit code 1.
[0] cross-env START_HOT=1 RUN_MODE=dev yarn start-renderer-dev exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.