HashGraphHub / hashpack-demo

Basic app to demonstrate how to integrate HashPack into a Svelte app
0 stars 0 forks source link

Getting errors upon initial Docker #1

Open ericsecution opened 1 year ago

ericsecution commented 1 year ago

Here's my error traceback from console (very top got cutoff, but 1-6 of 7 ran fine--only started to show errors once the npm run build command was executed on #7).

This was from after attempting to run Docker (which has worked fine for me in several other dozens of occasions--although, idk, maybe I'm missing something that seemed too obvious to put into the module_1.md and YouTube video...?) command docker-compose -f HashGraphHub/docker-compose.yml up -d --build --remove-orphans:

 => CACHED [app 4/7] COPY package-lock.json .                                                                                                                                               0.0s
 => CACHED [app 5/7] RUN npm install                                                                                                                                                        0.0s
 => [app 6/7] COPY . .                                                                                                                                                                      0.2s
 => ERROR [app 7/7] RUN npm run build                                                                                                                                                      86.8s
 => CANCELED [api 1/7] FROM docker.io/bobbystearman/hedera-py-java@sha256:58a28e8122c96f0918354d0b4d3ac217c59f3665bf3b87d1d88576bea5b508ae                                                 85.7s
 => => resolve docker.io/bobbystearman/hedera-py-java@sha256:58a28e8122c96f0918354d0b4d3ac217c59f3665bf3b87d1d88576bea5b508ae                                                               0.0s
 => => sha256:58a28e8122c96f0918354d0b4d3ac217c59f3665bf3b87d1d88576bea5b508ae 2.64kB / 2.64kB                                                                                              0.0s
 => => sha256:efd47ddc2890fcaa6b1a377f005c43c5b0702415659195b0a41752a5acccf5fe 9.77kB / 9.77kB                                                                                              0.0s
 => => sha256:f606d8928ed378229f2460b94b504cca239fb906efc57acbdf9340bd298d5ddf 55.05MB / 55.05MB                                                                                           16.9s
 => => sha256:47db815c6a4547dc224b75222193cb1851cf529d2cbdf26f854b9bbf97099b98 5.16MB / 5.16MB                                                                                              1.3s
 => => sha256:bf48494000001a037b72870d2a6a2536f9da8bc5d1ceddd72d79f4a51fe7a60e 10.88MB / 10.88MB                                                                                            8.2s
 => => sha256:a572f7a256d36a93ab0777949771b120c5d7dce75ea2a2d3d9444793b26b2ef1 54.58MB / 54.58MB                                                                                           48.9s
 => => sha256:8f7d0525895528fdb73153451e112bbd8e1854549bd1e0e6f4ac0b4a2ee98172 196.85MB / 196.85MB                                                                                         75.1s
 => => sha256:7110f04115ae2d7232ed9e59b97db7cf7337c91f95edc25428baa3e522064187 6.29MB / 6.29MB                                                                                             20.6s
 => => extracting sha256:f606d8928ed378229f2460b94b504cca239fb906efc57acbdf9340bd298d5ddf                                                                                                  16.4s
 => => sha256:c4b413c6a4894499e2ee7df958d411ccfcc899dccffe61de71cbb433e4e76143 20.05MB / 20.05MB                                                                                           26.8s
 => => sha256:22311b72a3cb993d70dc2f9440feb89ca571ae931b080d975c81f4270ca909b8 231B / 231B                                                                                                 27.9s
 => => sha256:8dcbfe38b6fa1182030e006f135471f3726cef064f6fc90edbdf80f450efad79 3.04MB / 3.04MB                                                                                             29.1s
 => => sha256:18c8925a97b223cc249fb286f3633be3ad410d51a469f5692e4d4bd7bbdd6470 212.96MB / 212.96MB                                                                                         70.9s
 => => extracting sha256:47db815c6a4547dc224b75222193cb1851cf529d2cbdf26f854b9bbf97099b98                                                                                                   2.0s
 => => extracting sha256:bf48494000001a037b72870d2a6a2536f9da8bc5d1ceddd72d79f4a51fe7a60e                                                                                                   1.3s
 => => sha256:6e21e39173585d8c0526bdcba04a81a8a667698e08d961245a336ea9e1ee7736 51.36MB / 51.36MB                                                                                           80.4s
 => => extracting sha256:a572f7a256d36a93ab0777949771b120c5d7dce75ea2a2d3d9444793b26b2ef1                                                                                                  17.5s
 => => extracting sha256:8f7d0525895528fdb73153451e112bbd8e1854549bd1e0e6f4ac0b4a2ee98172                                                                                                  10.2s
 => [api internal] load build context                                                                                                                                                       0.1s
 => => transferring context: 6.09kB                                                                                                                                                         0.0s
------
 > [app 7/7] RUN npm run build:
5.774 
5.774 > hashgraph-app@0.0.1 build
5.774 > vite build
5.774 
15.84 
15.92 vite v4.0.4 building for production...
16.10 transforming...
60.88 2:58:41 PM [vite-plugin-svelte] /src/lib/components/modal/signup/hederaWallet/index.svelte:4:11 HederaWallet has unused export property 'hederaData'. If it is for external reference only, please consider using `export const hederaData`
60.88 2: import CreateAccount from "./createAccount.svelte";
60.88 3: import ImportAccount from "./importAccount.svelte";
60.88 4: export let hederaData = {};
60.88               ^
60.88 5: let type = "import";
60.88 6: </script>
60.88 2:58:41 PM [vite-plugin-svelte] /src/lib/components/modal/signup/hederaWallet/index.svelte:21:19 Unused CSS selector ".btn-container"
60.88 19:   >
60.88 20: </div> -->
60.88 21: <style lang="scss">.btn-container {
60.88                        ^
60.88 22:   display: flex;
60.88 23:   justify-content: center;
69.02 ✓ 351 modules transformed.
69.03 2:58:49 PM [vite-plugin-svelte] dom compile done.
69.03 package           files     time    avg
69.03 hashgraph-app       224   28.19s  0.13s
69.03 @sveltejs/kit         1    0.35s  0.35s
69.71 rendering chunks...
70.94 
70.97 vite v4.0.4 building SSR bundle for production...
71.02 transforming...
85.19 2:59:05 PM [vite-plugin-svelte] /src/lib/components/modal/signup/hederaWallet/index.svelte:4:11 HederaWallet has unused export property 'hederaData'. If it is for external reference only, please consider using `export const hederaData`
85.19 2: import CreateAccount from "./createAccount.svelte";
85.19 3: import ImportAccount from "./importAccount.svelte";
85.19 4: export let hederaData = {};
85.19               ^
85.19 5: let type = "import";
85.19 6: </script>
85.19 2:59:05 PM [vite-plugin-svelte] /src/lib/components/modal/signup/hederaWallet/index.svelte:21:19 Unused CSS selector ".btn-container"
85.19 19:   >
85.19 20: </div> -->
85.19 21: <style lang="scss">.btn-container {
85.19                        ^
85.19 22:   display: flex;
85.19 23:   justify-content: center;
85.42 ✓ 348 modules transformed.
85.42 2:59:05 PM [vite-plugin-svelte] ssr compile done.
85.42 package           files    time      avg
85.42 hashgraph-app       224   6.46s   28.8ms
85.42 @sveltejs/kit         1   5.8ms    5.8ms
85.42 "PUBLIC_API" is not exported by "$env/static/public", imported by "src/routes/account/+page.server.ts".
85.42 file: /code/src/routes/account/+page.server.ts:3:9
85.42 1: import type { PageServerLoad, Actions } from './$types';
85.42 2: import { redirect, error } from '@sveltejs/kit';
85.42 3: import { PUBLIC_API } from '$env/static/public';
85.42             ^
85.42 4: import { PrivateKey } from '@hashgraph/sdk';
85.42 [vite-plugin-sveltekit-compile] "PUBLIC_API" is not exported by "$env/static/public", imported by "src/routes/account/+page.server.ts".
85.42 file: /code/src/routes/account/+page.server.ts:3:9
85.42 1: import type { PageServerLoad, Actions } from './$types';
85.42 2: import { redirect, error } from '@sveltejs/kit';
85.42 3: import { PUBLIC_API } from '$env/static/public';
85.42             ^
85.42 4: import { PrivateKey } from '@hashgraph/sdk';
85.43 error during build:
85.43 RollupError: "PUBLIC_API" is not exported by "$env/static/public", imported by "src/routes/account/+page.server.ts".
85.43     at error (file:///code/node_modules/rollup/dist/es/shared/rollup.js:2041:30)
85.43     at Module.error (file:///code/node_modules/rollup/dist/es/shared/rollup.js:13062:16)
85.43     at Module.traceVariable (file:///code/node_modules/rollup/dist/es/shared/rollup.js:13445:29)
85.43     at ModuleScope.findVariable (file:///code/node_modules/rollup/dist/es/shared/rollup.js:11926:39)
85.43     at ReturnValueScope.findVariable (file:///code/node_modules/rollup/dist/es/shared/rollup.js:6761:38)
85.43     at ChildScope.findVariable (file:///code/node_modules/rollup/dist/es/shared/rollup.js:6761:38)
85.43     at Identifier.bind (file:///code/node_modules/rollup/dist/es/shared/rollup.js:7855:40)
85.43     at TemplateLiteral.bind (file:///code/node_modules/rollup/dist/es/shared/rollup.js:5649:28)
85.43     at CallExpression.bind (file:///code/node_modules/rollup/dist/es/shared/rollup.js:5649:28)
85.43     at CallExpression.bind (file:///code/node_modules/rollup/dist/es/shared/rollup.js:9382:15)
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
ericpaul@Erics-MacBook-Pro-2 hashpack-demo % 
bobby-didcoding commented 1 year ago

Hi there. It looks like it can't find PUBLIC_KEY & PRIVATE_KEY variable to initialise Hashpack. I believe Jake discusses this in his tutorial. I can have a more detailed look at this when I'm back in front on my screen 👍