You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get the headless dev container to work to build polar.
Here's the steps I've followed:
git clone https://github.com/jamaljsr/polar
cd polar
cd .devcontainer
docker image build --tag polardev:headless --file Dockerfile-headless .
cd ..
docker container run --volume "$PWD":/app --name polar --detach --rm polardev:headless sleep infinity
then I get
$ docker container exec polar yarn package
Yarn requires Node.js 4.0 or higher to be installed.
$
which doesn't make sense, so I instead try
$ docker container exec -it polar bash
dev@476919cd3cb0:/app$ node -v
v20.1.0
dev@476919cd3cb0:/app$
dev@f77f81f60e92:/app$ yarn package
yarn run v1.22.22
$ yarn build && yarn package:electron
$ tsc -p electron/tsconfig.json && yarn theme
electron/appIpcListener.ts:32:7 - error TS2353: Object literal may only specify known properties, and 'enableRemoteModule' does not exist in type 'WebPreferences'.
32 enableRemoteModule: true,
~~~~~~~~~~~~~~~~~~
electron/windowManager.ts:54:9 - error TS2353: Object literal may only specify known properties, and 'enableRemoteModule' does not exist in type 'WebPreferences'.
54 enableRemoteModule: true,
~~~~~~~~~~~~~~~~~~
src/shared/tapdDefaults.ts:80:3 - error TS2741: Property ''anchorTxBlockHash'' is missing in type '{ anchorTxChainFees: string; anchorTxHash: Buffer; anchorTxHeightHint: number; transferTimestamp: string; inputs: never[]; outputs: never[]; }' but required in type 'AssetTransfer'.
80 transfer: {
~~~~~~~~
node_modules/@lightningpolar/tapd-api/dist/types/taprpc/AssetTransfer.d.ts:22:5
22 'anchorTxBlockHash': (_taprpc_ChainHash | null);
~~~~~~~~~~~~~~~~~~~
''anchorTxBlockHash'' is declared here.
node_modules/@lightningpolar/tapd-api/dist/types/taprpc/SendAssetResponse.d.ts:6:5
6 'transfer': (_taprpc_AssetTransfer | null);
~~~~~~~~~~
The expected type comes from property 'transfer' which is declared here on type 'SendAssetResponse'
src/shared/tapdDefaults.ts:111:5 - error TS2353: Object literal may only specify known properties, and 'askPrice' does not exist in type 'PeerAcceptedBuyQuote'.
111 askPrice: '',
~~~~~~~~
node_modules/@lightningpolar/tapd-api/dist/types/rfqrpc/AddAssetBuyOrderResponse.d.ts:11:5
11 'acceptedQuote'?: (_rfqrpc_PeerAcceptedBuyQuote | null);
~~~~~~~~~~~~~~~
The expected type comes from property 'acceptedQuote' which is declared here on type 'AddAssetBuyOrderResponse'
src/shared/tapdDefaults.ts:137:5 - error TS2353: Object literal may only specify known properties, and 'bidPrice' does not exist in type 'PeerAcceptedSellQuote'.
137 bidPrice: '',
~~~~~~~~
node_modules/@lightningpolar/tapd-api/dist/types/rfqrpc/AddAssetSellOrderResponse.d.ts:11:5
11 'acceptedQuote'?: (_rfqrpc_PeerAcceptedSellQuote | null);
~~~~~~~~~~~~~~~
The expected type comes from property 'acceptedQuote' which is declared here on type 'AddAssetSellOrderResponse'
src/shared/utils.ts:1:15 - error TS2305: Module '"electron"' has no exported member 'remote'.
1 import { app, remote } from 'electron';
~~~~~~
Found 6 errors in 4 files.
Errors Files
1 electron/appIpcListener.ts:32
1 electron/windowManager.ts:54
3 src/shared/tapdDefaults.ts:80
1 src/shared/utils.ts:1
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
dev@f77f81f60e92:/app$
which also is a fail.
The text was updated successfully, but these errors were encountered:
I remember I had to taken an extra step which was to locally change the npm scripts to pass a flag to electron such that it would disable sandbox. Electron needs to disable the sandbox and lower its security, otherwise it is not possible to forward the GUI via X11 backend (this is only for the yarn dev script, because the yarn build I guess it should work). I am not sure if this was the only step necessary or if there was something else. I also remember having trouble with yarn as well. I was able to build polar back then.
My approach would be try to build polar on a Linux host with yarn, just to make sure it is building on Linux and it is not some wrong container setup. Also, the container may have outdated packages (maybe outdated yarn our nodejs?)
I'm currently not using Polar because I'm not developing on the LN right now, but the software is excellent, I do like it! So I'll be glad if I can help it
I am trying to get the headless dev container to work to build polar.
Here's the steps I've followed:
then I get
which doesn't make sense, so I instead try
which also is a fail.
The text was updated successfully, but these errors were encountered: