Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker for development and preview of DApps in container environment #848

Closed
wants to merge 10 commits into from

Conversation

ltfschoen
Copy link
Contributor

@ltfschoen ltfschoen commented Dec 25, 2022

Summary of changes

  • Allow developers to run bridge-dapp and stats-dapp in a Docker container and expose them on port 3000 and 4000 and access them at the same time from their browser.
  • Includes an example of how to expose relevant ports incase they are hosting webb-dapp on a Linux cloud provider.
  • Developer may create and edit dapps from their host machine even if the webb-dapp is inside the docker container and hosted on a cloud provider instance and when they save the changes they will be reflected in the UI

Code Checklist

  • Tested
  • Documented

@ltfschoen ltfschoen changed the title Docker development Docker for development and preview of DApps in container environment Dec 25, 2022
@drewstone
Copy link
Contributor

Thanks for the contribution @ltfschoen !

README.md Show resolved Hide resolved
Copy link
Member

@AtelyPham AtelyPham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a .env.example file? Something like this in the relayer.

Thanks for your contribution @ltfschoen.

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Dec 26, 2022

Can you add a .env.example file? Something like this in the relayer.

Thanks for your contribution @ltfschoen.

i've added .env.example here.

incase the .env file isn't populated by the user the variable values in .env.example are used instead here

@ltfschoen
Copy link
Contributor Author

@AtelyPham in addition to what's in this PR i tried to run webb-ui-components from the Docker container and have it exposed on port 4400 using this code ltfschoen@8e989b5, but even though it compiled successfully i wasn't able to access anything in a browser, and even when i ran curl http://localhost:4400/ in the terminal from within the Docker container itself it just returned curl: (56) Recv failure: Connection reset by peer even though access to port 4400/tcp was allowed from anywhere

@AtelyPham AtelyPham self-requested a review January 4, 2023 21:27
WORKDIR ${PATH_PROJECT}

COPY package.json .

Copy link
Member

@AtelyPham AtelyPham Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding this line to install to improve the time to install the npm packages.

COPY yarn.lock .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've pushed commit adding this ae65b67

without yarn.lock copied it took time ./docker-dev.sh duration real 11m6.119s
then with yarn.lock copied it took time ./docker-dev.sh duration real 5m14.703s

although it now shows this when building

[1/4] Resolving packages...
warning Lockfile has incorrect entry for "@polkadot/[email protected]". Ignoring it.
warning Lockfile has incorrect entry for "@polkadot/[email protected]". Ignoring it.
warning Lockfile has incorrect entry for "@polkadot/[email protected]". Ignoring it.
warning Lockfile has incorrect entry for "@polkadot/[email protected]". Ignoring it.
warning Lockfile has incorrect entry for "@polkadot/[email protected]". Ignoring it.
warning Lockfile has incorrect entry for "@polkadot/[email protected]". Ignoring it.
warning Lockfile has incorrect entry for "@polkadot/[email protected]". Ignoring it.
warning Lockfile has incorrect entry for "typescript@~4.8.2". Ignoring it.

Copy link
Member

@AtelyPham AtelyPham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response @ltfschoen. Added a comment and I hit this error while trying to run ./docker-dev.sh locally.

Error
error /app/webb-monorepo/node_modules/utf-8-validate: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /app/webb-monorepo/node_modules/utf-8-validate
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm64
gyp ERR! find Python
gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - "python" is not in PATH or produced an error
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python   (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use
gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
gyp ERR! stack     at exithandler (node:child_process:410:5)
gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:422:5)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! stack     at onErrorNT (node:internal/child_process:485:16)
gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
gyp ERR! System Linux 5.10.104-linuxkit
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/webb-monorepo/node_modules/utf-8-validate
gyp ERR! node -v v16.19.0
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
1 error occurred:
	* Status: The command '/bin/sh -c yarn' returned a non-zero code: 1, Code: 1
Screenshot

CleanShot 2023-01-05 at 04 49 42@2x

I added below line to fix the error

# ...

RUN apk update && apk add --update git

RUN apk add --update python3 make g++\
  && rm -rf /var/cache/apk/*

RUN yarn

# ...

@AtelyPham
Copy link
Member

Another thing is after running the docker successfully, there are lots of <none> containers created.

CleanShot 2023-01-05 at 05 13 27@2x

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Jan 5, 2023

Another thing is after running the docker successfully, there are lots of <none> containers created.

CleanShot 2023-01-05 at 05 13 27@2x

with the docker command you can do --rm or --force-rm to remove intermediate containers.

but we're using docker compose so i think the best solution would be to label all the intermediate containers and run a command to remove all the containers with that label. that way you don't remove intermediate images and containers that you are using for other docker projects.

i think the best solution for this would be to use this approach https://stackoverflow.com/a/55082473/3208553, so the changes could be something like:

Dockerfile.dev

FROM node:gallium-alpine
...
ARG BUILD_ID
LABEL build=$BUILD_ID
ENV BUILD_ID=$BUILD_ID
...

Then either provide the BUILD_ID in the .env file and pass through with args or probably sufficient just to set it directly with something like ARG BUILD_ID=webb-dapp-intermediate.

Then can prune them after the final image and container is created:

docker image prune --filter label=build=$BUILD_ID

@ltfschoen
Copy link
Contributor Author

another consideration is that this PR only supports users that are using the latest docker compose, but i think there's a remote possibility that users might only have the compose standalone docker-compose but not the latest docker binary. ideally users just install the latest docker as mentioned in comments here paritytech/substrate#13039, but if want to cater for docker-compose (with dash) then this is an option (although its messy) https://github.com/paritytech/substrate/pull/13039/files#diff-2a922fdf19eb7ad62ae463320bdbc0dab6ad151d614f10cdd68f5a4e1fbc2b0cR5

@ltfschoen
Copy link
Contributor Author

Sorry for the late response @ltfschoen. Added a comment and I hit this error while trying to run ./docker-dev.sh locally.

Error
Screenshot
I added below line to fix the error

# ...

RUN apk update && apk add --update git

RUN apk add --update python3 make g++\
  && rm -rf /var/cache/apk/*

RUN yarn

# ...

i've pushed a commit ae65b67 adding this

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Jan 6, 2023

Another thing is after running the docker successfully, there are lots of <none> containers created.
CleanShot 2023-01-05 at 05 13 27@2x

with the docker command you can do --rm or --force-rm to remove intermediate containers.

but we're using docker compose so i think the best solution would be to label all the intermediate containers and run a command to remove all the containers with that label. that way you don't remove intermediate images and containers that you are using for other docker projects.

i think the best solution for this would be to use this approach https://stackoverflow.com/a/55082473/3208553, so the changes could be something like:

Dockerfile.dev

FROM node:gallium-alpine
...
ARG BUILD_ID
LABEL build=$BUILD_ID
ENV BUILD_ID=$BUILD_ID
...

Then either provide the BUILD_ID in the .env file and pass through with args or probably sufficient just to set it directly with something like ARG BUILD_ID=webb-dapp-intermediate.

Then can prune them after the final image and container is created:

docker image prune --filter label=build=$BUILD_ID

i tried adding the labelling using BUILD_ID but that didn't help.

i found that those images are dangling images, they don't appear when you run docker images but they do when you run docker images -a, and to remove only the dangling images you run docker rmi -f $(docker images -f "dangling=true" -q). to cleanup dangling and unused images docker image prune -a. if you delete absolutely everything (after stopping any containers that are running) including all images and containers to free up disk space run docker system prune --all --volumes --force

even if i try building with docker build --force-rm --no-cache ... instead of using docker compose ... up .. it still shows them all

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Jan 6, 2023

after building with ./docker-dev.sh then

running CONTAINER_ID=$(docker ps -n=1 -q) && docker exec -it $CONTAINER_ID yarn start:bridge gives error:

error

```bash ERROR in ./src/index.tsx Module build failed (from ../../node_modules/thread-loader/dist/cjs.js): Thread Loader (Worker 0) Unknown option: .assumptions. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

at throwUnknownError (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:124:27)
at /app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:109:5
at Array.forEach (<anonymous>)
at validateNested (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:85:21)
at validate (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:76:10)
at loadPrivatePartialConfig (/app/webb-monorepo/node_modules/@babel/core/lib/config/partial.js:78:50)
at loadPrivatePartialConfig.next (<anonymous>)
at Function.<anonymous> (/app/webb-monorepo/node_modules/@babel/core/lib/config/partial.js:140:25)
at Generator.next (<anonymous>)
at evaluateSync (/app/webb-monorepo/node_modules/gensync/index.js:251:28)

webpack 5.75.0 compiled with 1 error in 1842 ms


</p>
</details>

@ltfschoen
Copy link
Contributor Author

and,
running docker exec -it $CONTAINER_ID yarn start:stats gives error:

error

```bash [webpack-dev-server] Project is running at: [webpack-dev-server] Loopback: http://localhost:3001/ [webpack-dev-server] On Your Network (IPv4): http://172.18.0.2:3001/ [webpack-dev-server] Content not from webpack is served from '/app/webb-monorepo/public' directory Listening on port: 3001 [BABEL] Note: The code generator has deoptimised the styling of /app/webb-monorepo/apps/stats-dapp/src/generated/graphql.tsx as it exceeds the max of 500KB. assets by path *.js 22.8 MiB assets by chunk 18.1 MiB (id hint: vendors) 4 assets + 53 assets assets by path static/*.png 43.8 KiB asset static/star.67b49168.png 34.6 KiB [emitted] [immutable] [from: ../../libs/webb-ui-components/src/assets/star.png] (auxiliary name: main) asset static/star-dark.96780024.png 9.16 KiB [emitted] [immutable] [from: ../../libs/webb-ui-components/src/assets/star-dark.png] (auxiliary name: main) assets by path *.png 32.4 KiB asset favicon.png 16.2 KiB [emitted] [from: src/public/favicon.png] [copied] asset logo.png 16.2 KiB [emitted] [from: src/public/logo.png] [copied] assets by path *.json 390 bytes asset manifest.json 312 bytes [emitted] [from: src/public/manifest.json] [copied] asset i18n.json 78 bytes [emitted] [from: src/public/i18n.json] [copied] asset adcaf6a1ffc740d7.module.wasm 1.35 MiB [emitted] [immutable] [big] (auxiliary id hint: vendors) asset ./index.html 930 bytes [emitted] asset robots.txt 57 bytes [emitted] [from: src/public/robots.txt] [copied] Entrypoint main [big] 22 MiB (17.7 MiB) = vendors-node_modules_babel_polyfill_lib_index_js-node_modules_ngneat_falso_index_esm_js-node_-e26667.6e46a2c9.js 17.7 MiB main.85ab18fd.js 4.3 MiB 4 auxiliary assets orphan modules 7.72 MiB [orphan] 2049 modules runtime modules 44.8 KiB 26 modules modules by path ../../ 17.2 MiB (javascript) 1.35 MiB (webassembly) 43.8 KiB (asset) modules by path ../../node_modules/ 15.2 MiB (javascript) 1.35 MiB (webassembly) 2646 modules modules by path ../../libs/ 1.96 MiB (javascript) 43.8 KiB (asset) 401 modules modules by path ./ 813 KiB modules by path ./src/ 810 KiB 63 modules modules by path ./*.css 2.82 KiB ./styles.css 2.78 KiB [built] [code generated] ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./styles.css 39 bytes [built] [code generated] [1 error] modules by path ^/.// 320 bytes ../../libs/icons/src/ lazy !!../../node_modules/@svgr/webpack/lib/index.js?+svgo,+titleProp,+ref! ^\.\/.*\.svg$ namespace object 160 bytes [built] [code generated] ../../libs/icons/src/ lazy !!../../node_modules/@svgr/webpack/lib/index.js?+svgo,+titleProp,+ref! ^\.\/.*s\/default\.svg$ namespace object 160 bytes [built] [code generated] + 28 modules

ERROR in ./src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/index.js
  • /app/webb-monorepo/node_modules/babel-loader/lib/index.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
  • /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
  • /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
  • /app/webb-monorepo/node_modules/webpack/lib/webpack.js
  • /app/webb-monorepo/node_modules/webpack/lib/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
    @ ./src/containers/StackedAreaChartContainer/index.ts 3:0-44 3:0-44
    @ ./src/pages/Proposals.tsx 21:0-84 229:40-65
    @ ./src/routes/index.tsx 37:9-57
    @ ./src/App.tsx 7:0-34 18:12-18
    @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./src/hooks/useDonutColor.ts
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/index.js
  • /app/webb-monorepo/node_modules/babel-loader/lib/index.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
  • /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
  • /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
  • /app/webb-monorepo/node_modules/webpack/lib/webpack.js
  • /app/webb-monorepo/node_modules/webpack/lib/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
    @ ./src/containers/DonutChartContainer/DonutChartContainer.tsx 6:0-58 26:20-33 176:10-23
    @ ./src/containers/DonutChartContainer/index.ts 3:0-38 3:0-38
    @ ./src/containers/index.ts 5:0-38 5:0-38
    @ ./src/routes/index.tsx 6:0-39 255:44-50
    @ ./src/App.tsx 7:0-34 18:12-18
    @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./src/pages/AuthoritiesHistory.tsx
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/index.js
  • /app/webb-monorepo/node_modules/babel-loader/lib/index.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
  • /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
  • /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
  • /app/webb-monorepo/node_modules/webpack/lib/webpack.js
  • /app/webb-monorepo/node_modules/webpack/lib/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
    @ ./src/routes/index.tsx 21:9-66
    @ ./src/App.tsx 7:0-34 18:12-18
    @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/Accordion.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionButton.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 4:0-34 4:0-34
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionContent.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 5:0-35 5:0-35
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionItem.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 6:0-32 6:0-32
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/Popover.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 3:0-26 3:0-26
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverArrow.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 4:0-31 4:0-31
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverClose.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 5:0-31 5:0-31
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverContent.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 6:0-33 6:0-33
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverTrigger.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 7:0-33 7:0-33
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/ScrollArea/ScrollArea.tsx 13:0-67
Module not found: Error: Can't resolve '@radix-ui/react-scroll-area' in '/app/webb-monorepo/libs/webb-ui-components/src/components/ScrollArea'
@ ../../libs/webb-ui-components/src/components/ScrollArea/index.ts 3:0-29 3:0-29
@ ../../libs/webb-ui-components/src/components/FileUploads/FileUploadList.tsx 12:0-43 20:42-52
@ ../../libs/webb-ui-components/src/components/FileUploads/index.ts 6:0-33 6:0-33
@ ../../libs/webb-ui-components/src/components/index.ts 23:0-30 23:0-30
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/containers/TransactionProgressCard/TransactionProgressCard.tsx 17:0-34
Module not found: Error: Can't resolve 'lottie-react' in '/app/webb-monorepo/libs/webb-ui-components/src/containers/TransactionProgressCard'
@ ../../libs/webb-ui-components/src/containers/TransactionProgressCard/index.ts 4:0-42 4:0-42
@ ../../libs/webb-ui-components/src/containers/index.ts 8:0-42 8:0-42
@ ../../libs/webb-ui-components/src/index.ts 4:0-29 4:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./styles.css (../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./styles.css)
Module build failed (from ../../node_modules/postcss-loader/dist/cjs.js):
Error: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/tailwind.config.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/index.js
  • /app/webb-monorepo/apps/stats-dapp/webpack.config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/webpack/custom-webpack.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/tailwind.config.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    @ ./styles.css 8:6-276 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-246 83:0-246 84:22-29 84:33-47 84:50-64 61:4-74:5
    @ ./src/index.tsx 4:0-23

ERROR in ../../libs/webb-ui-components/src/tailwind.css (../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!../../libs/webb-ui-components/src/tailwind.css)
Module build failed (from ../../node_modules/postcss-loader/dist/cjs.js):
Error: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/libs/webb-ui-components/tailwind.config.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/index.js
  • /app/webb-monorepo/apps/stats-dapp/webpack.config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/webpack/custom-webpack.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/libs/webb-ui-components/tailwind.config.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    @ ../../libs/webb-ui-components/src/tailwind.css 8:6-287 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-257 83:0-257 84:22-29 84:33-47 84:50-64 61:4-74:5
    @ ./src/index.tsx 5:0-53

11 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.75.0 compiled with 16 errors in 38649 ms
assets by path *.js 22.8 MiB
assets by chunk 18.1 MiB (id hint: vendors) 4 assets

  • 53 assets
    assets by path static/*.png 43.8 KiB
    asset static/star.67b49168.png 34.6 KiB [emitted] [immutable] [from: ../../libs/webb-ui-components/src/assets/star.png] (auxiliary name: main)
    asset static/star-dark.96780024.png 9.16 KiB [emitted] [immutable] [from: ../../libs/webb-ui-components/src/assets/star-dark.png] (auxiliary name: main)
    assets by path .png 32.4 KiB
    asset favicon.png 16.2 KiB [emitted] [from: src/public/favicon.png] [copied]
    asset logo.png 16.2 KiB [emitted] [from: src/public/logo.png] [copied]
    assets by path .json 390 bytes
    asset manifest.json 312 bytes [emitted] [from: src/public/manifest.json] [copied]
    asset i18n.json 78 bytes [emitted] [from: src/public/i18n.json] [copied]
    asset adcaf6a1ffc740d7.module.wasm 1.35 MiB [emitted] [immutable] [big] (auxiliary id hint: vendors)
    asset ./index.html 930 bytes [emitted]
    asset robots.txt 57 bytes [emitted] [from: src/public/robots.txt] [copied]
    Entrypoint main [big] 22 MiB (17.7 MiB) = vendors-node_modules_babel_polyfill_lib_index_js-node_modules_ngneat_falso_index_esm_js-node_-e26667.6e46a2c9.js 17.7 MiB main.85ab18fd.js 4.3 MiB 4 auxiliary assets
    orphan modules 7.72 MiB [orphan] 2049 modules
    runtime modules 44.8 KiB 26 modules
    modules by path ../../ 17.2 MiB (javascript) 1.35 MiB (webassembly) 43.8 KiB (asset)
    modules by path ../../node_modules/ 15.2 MiB (javascript) 1.35 MiB (webassembly) 2646 modules
    modules by path ../../libs/ 1.96 MiB (javascript) 43.8 KiB (asset) 401 modules
    modules by path ./ 813 KiB
    modules by path ./src/ 810 KiB 63 modules
    modules by path ./
    .css 2.82 KiB
    ./styles.css 2.78 KiB [built] [code generated]
    ../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./styles.css 39 bytes [built] [code generated] [1 error]
    modules by path ^/.// 320 bytes
    ../../libs/icons/src/ lazy !!../../node_modules/@svgr/webpack/lib/index.js?+svgo,+titleProp,+ref! ^./.
    .svg$ namespace object 160 bytes [built] [code generated]
    ../../libs/icons/src/ lazy !!../../node_modules/@svgr/webpack/lib/index.js?+svgo,+titleProp,+ref! ^./.*s/default.svg$ namespace object 160 bytes [built] [code generated]
  • 28 modules

ERROR in ./src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/index.js
  • /app/webb-monorepo/node_modules/babel-loader/lib/index.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
  • /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
  • /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
  • /app/webb-monorepo/node_modules/webpack/lib/webpack.js
  • /app/webb-monorepo/node_modules/webpack/lib/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
    @ ./src/containers/StackedAreaChartContainer/index.ts 3:0-44 3:0-44
    @ ./src/pages/Proposals.tsx 21:0-84 229:40-65
    @ ./src/routes/index.tsx 37:9-57
    @ ./src/App.tsx 7:0-34 18:12-18
    @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./src/hooks/useDonutColor.ts
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/index.js
  • /app/webb-monorepo/node_modules/babel-loader/lib/index.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
  • /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
  • /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
  • /app/webb-monorepo/node_modules/webpack/lib/webpack.js
  • /app/webb-monorepo/node_modules/webpack/lib/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
    @ ./src/containers/DonutChartContainer/DonutChartContainer.tsx 6:0-58 26:20-33 176:10-23
    @ ./src/containers/DonutChartContainer/index.ts 3:0-38 3:0-38
    @ ./src/containers/index.ts 5:0-38 5:0-38
    @ ./src/routes/index.tsx 6:0-39 255:44-50
    @ ./src/App.tsx 7:0-34 18:12-18
    @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./src/pages/AuthoritiesHistory.tsx
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
  • /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
  • /app/webb-monorepo/node_modules/@babel/core/lib/index.js
  • /app/webb-monorepo/node_modules/babel-loader/lib/index.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
  • /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
  • /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
  • /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
  • /app/webb-monorepo/node_modules/webpack/lib/webpack.js
  • /app/webb-monorepo/node_modules/webpack/lib/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
    @ ./src/routes/index.tsx 21:9-66
    @ ./src/App.tsx 7:0-34 18:12-18
    @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/Accordion.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionButton.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 4:0-34 4:0-34
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionContent.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 5:0-35 5:0-35
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionItem.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
@ ../../libs/webb-ui-components/src/components/Accordion/index.ts 6:0-32 6:0-32
@ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/Popover.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 3:0-26 3:0-26
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverArrow.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 4:0-31 4:0-31
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverClose.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 5:0-31 5:0-31
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverContent.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 6:0-33 6:0-33
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverTrigger.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
@ ../../libs/webb-ui-components/src/components/Popover/index.ts 7:0-33 7:0-33
@ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/ScrollArea/ScrollArea.tsx 13:0-67
Module not found: Error: Can't resolve '@radix-ui/react-scroll-area' in '/app/webb-monorepo/libs/webb-ui-components/src/components/ScrollArea'
@ ../../libs/webb-ui-components/src/components/ScrollArea/index.ts 3:0-29 3:0-29
@ ../../libs/webb-ui-components/src/components/FileUploads/FileUploadList.tsx 12:0-43 20:42-52
@ ../../libs/webb-ui-components/src/components/FileUploads/index.ts 6:0-33 6:0-33
@ ../../libs/webb-ui-components/src/components/index.ts 23:0-30 23:0-30
@ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/containers/TransactionProgressCard/TransactionProgressCard.tsx 17:0-34
Module not found: Error: Can't resolve 'lottie-react' in '/app/webb-monorepo/libs/webb-ui-components/src/containers/TransactionProgressCard'
@ ../../libs/webb-ui-components/src/containers/TransactionProgressCard/index.ts 4:0-42 4:0-42
@ ../../libs/webb-ui-components/src/containers/index.ts 8:0-42 8:0-42
@ ../../libs/webb-ui-components/src/index.ts 4:0-29 4:0-29
@ ./src/App.tsx 6:0-64 9:42-56
@ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./styles.css (../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./styles.css)
Module build failed (from ../../node_modules/postcss-loader/dist/cjs.js):
Error: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/apps/stats-dapp/tailwind.config.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/index.js
  • /app/webb-monorepo/apps/stats-dapp/webpack.config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/webpack/custom-webpack.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/apps/stats-dapp/tailwind.config.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    @ ./styles.css 8:6-276 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-246 83:0-246 84:22-29 84:33-47 84:50-64 61:4-74:5
    @ ./src/index.tsx 4:0-23

ERROR in ../../libs/webb-ui-components/src/tailwind.css (../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!../../libs/webb-ui-components/src/tailwind.css)
Module build failed (from ../../node_modules/postcss-loader/dist/cjs.js):
Error: Cannot find module '@webb-tools/tailwind-preset'
Require stack:

  • /app/webb-monorepo/libs/webb-ui-components/tailwind.config.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js
  • /app/webb-monorepo/node_modules/tailwindcss/lib/index.js
  • /app/webb-monorepo/apps/stats-dapp/webpack.config.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/webpack/custom-webpack.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
  • /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
  • /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
  • /app/webb-monorepo/node_modules/nx/src/command-line/run.js
  • /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/app/webb-monorepo/libs/webb-ui-components/tailwind.config.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    @ ../../libs/webb-ui-components/src/tailwind.css 8:6-287 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-257 83:0-257 84:22-29 84:33-47 84:50-64 61:4-74:5
    @ ./src/index.tsx 5:0-53

11 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.75.0 compiled with 16 errors in 38649 ms

</p>
</details>

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Jan 6, 2023

FYI, i tried to use docker build ... && docker run ... instead of docker compose ... --build as shown below since i could use the --force-rm and --rm cli options, but the dangling images still remain so can't see any advantage of doing that

previous

DOCKER_BUILDKIT=0 docker compose -f docker-compose-dev.yml up --build -d

new

docker build --force-rm \
	--no-cache \
        --tag ${NAME_PROJECT}:${VERSION_PROJECT} \
        --label ${NAME_PROJECT} \
	--build-arg NAME_PROJECT=${NAME_PROJECT} \
	--build-arg NAME_BRIDGE_DAPP=${NAME_BRIDGE_DAPP} \
	--build-arg NAME_STATS_DAPP=${NAME_STATS_DAPP} \
	--build-arg PORT_BRIDGE_DAPP=${PORT_BRIDGE_DAPP} \
	--build-arg PORT_STATS_DAPP=${PORT_STATS_DAPP} \
	-f ./docker/Dockerfile.dev .

docker volume create ignore

docker run -it -d \
	--rm \
	--env-file "./.env" \
	--hostname ${NAME_PROJECT}-dev \
	--name ${NAME_PROJECT}-dev \
	--label ${NAME_PROJECT}-dev \
	--pull "never" \
	--publish ${PORT_BRIDGE_DAPP}:${PORT_BRIDGE_DAPP} \
	--publish ${PORT_STATS_DAPP}:${PORT_STATS_DAPP} \
	--volume $PWD:/app/${NAME_PROJECT}:rw \
        --volume ignore:/app/${NAME_PROJECT}/node_modules:ro \
	--expose ${PORT_BRIDGE_DAPP}-${PORT_STATS_DAPP} \
	${NAME_PROJECT}:${VERSION_PROJECT}

```bash
./docker-dev.sh
```
Note: The script requires `jq` command to be installed (i.e. Ubuntu `apt-get install -y jq`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding wget here, because wget does not exist by default in some OS.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think its a requirement as you have fallback namespaces in place, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding wget here, because wget does not exist by default in some OS.

yes, good idea. i think it would be most seamless to embed a script like this in the docker-dev.sh script https://github.com/paritytech/scripts/blob/master/get-substrate.sh, where it installs the necessary dependencies depending on what operating system it detects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think its a requirement as you have fallback namespaces in place, no?

i just tried a fresh install on my local macOS machine where i don't have wget and haven't created the .env file. when i run docker-dev.sh it outputs the following. so yes it uses the existing fallbacks defined in the docker-dev.sh file so it works even if wget command not found, but probably should detect their OS and try to install it.

./docker-dev.sh: line 7: wget: command not found
./docker-dev.sh: line 15: ./.env: No such file or directory
...
*** Started building Docker container.
*** Please wait... 
***open /Users/me/ltfschoen/webb-dapp/.env: no such file or directory

i was also concerned because we don't have fallbacks for the ports PORT_BRIDGE_DAPP and PORT_STATS_DAPP, but it doesn't get any further than trying to run docker compose ... command where expects an .env file to continue, since in docker-compose-dev.yml it has:

services:
  dev:
    ...
    env_file:
      - .env

i think we'd only be concerned about fallbacks if the user created an empty .env file but didn't follow the README.md instructions where it says to create it based on the .env.example with cp .env.example .env

@dutterbutter dutterbutter requested review from dutterbutter and removed request for AhmedKorim January 11, 2023 21:12
@dutterbutter
Copy link
Contributor

@ltfschoen thanks for the contribution! Consider:

  • I think it would be best to move the ./docker-dev.sh script, and docker-compose file to the docker folder and adding a README there with instructions, useful commands as done in the root README

In addition, I was able to build the docker container fine with the provided instructions but failed to serve both the bridge-dapp and stats-dapp. Since I ran this on macos the fallback namespaces were used so perhaps that might be a potential cause but not entirely sure? Error logs for each provided below.

bridge-dapp log

Serving bridge-dapp error log
ERROR in ./src/index.tsx
Module build failed (from ../../node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
Unknown option: .assumptions. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

    at throwUnknownError (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:124:27)
    at /app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:109:5
    at Array.forEach (<anonymous>)
    at validateNested (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:85:21)
    at validate (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:76:10)
    at loadPrivatePartialConfig (/app/webb-monorepo/node_modules/@babel/core/lib/config/partial.js:78:50)
    at loadPrivatePartialConfig.next (<anonymous>)
    at Function.<anonymous> (/app/webb-monorepo/node_modules/@babel/core/lib/config/partial.js:140:25)
    at Generator.next (<anonymous>)
    at evaluateSync (/app/webb-monorepo/node_modules/gensync/index.js:251:28)

webpack 5.75.0 compiled with 1 error in 1156 ms

Stats-dapp log

Serving stats-dapp error log
ERROR in ./src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx: Cannot find module '@webb-tools/tailwind-preset'
Require stack:
- /app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx
- /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
- /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
- /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
- /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
- /app/webb-monorepo/node_modules/@babel/core/lib/index.js
- /app/webb-monorepo/node_modules/babel-loader/lib/index.js
- /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
- /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
- /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
- /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
- /app/webb-monorepo/node_modules/webpack/lib/webpack.js
- /app/webb-monorepo/node_modules/webpack/lib/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
- /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
- /app/webb-monorepo/node_modules/nx/src/command-line/run.js
- /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/app/webb-monorepo/apps/stats-dapp/src/containers/StackedAreaChartContainer/StackedAreaChartContainer.tsx:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
 @ ./src/containers/StackedAreaChartContainer/index.ts 3:0-44 3:0-44
 @ ./src/pages/Proposals.tsx 21:0-84 229:40-65
 @ ./src/routes/index.tsx 37:9-57
 @ ./src/App.tsx 7:0-34 18:12-18
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./src/hooks/useDonutColor.ts
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts: Cannot find module '@webb-tools/tailwind-preset'
Require stack:
- /app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts
- /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
- /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
- /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
- /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
- /app/webb-monorepo/node_modules/@babel/core/lib/index.js
- /app/webb-monorepo/node_modules/babel-loader/lib/index.js
- /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
- /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
- /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
- /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
- /app/webb-monorepo/node_modules/webpack/lib/webpack.js
- /app/webb-monorepo/node_modules/webpack/lib/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
- /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
- /app/webb-monorepo/node_modules/nx/src/command-line/run.js
- /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/app/webb-monorepo/apps/stats-dapp/src/hooks/useDonutColor.ts:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
 @ ./src/containers/DonutChartContainer/DonutChartContainer.tsx 6:0-58 26:20-33 176:10-23
 @ ./src/containers/DonutChartContainer/index.ts 3:0-38 3:0-38
 @ ./src/containers/index.ts 5:0-38 5:0-38
 @ ./src/routes/index.tsx 6:0-39 255:44-50
 @ ./src/App.tsx 7:0-34 18:12-18
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./src/pages/AuthoritiesHistory.tsx
Module build failed (from ../../node_modules/babel-loader/lib/index.js):
Error: /app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx: Cannot find module '@webb-tools/tailwind-preset'
Require stack:
- /app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx
- /app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js
- /app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js
- /app/webb-monorepo/node_modules/@babel/core/lib/config/files/plugins.js
- /app/webb-monorepo/node_modules/@babel/core/lib/config/files/index.js
- /app/webb-monorepo/node_modules/@babel/core/lib/index.js
- /app/webb-monorepo/node_modules/babel-loader/lib/index.js
- /app/webb-monorepo/node_modules/loader-runner/lib/loadLoader.js
- /app/webb-monorepo/node_modules/loader-runner/lib/LoaderRunner.js
- /app/webb-monorepo/node_modules/webpack/lib/NormalModuleFactory.js
- /app/webb-monorepo/node_modules/webpack/lib/Compiler.js
- /app/webb-monorepo/node_modules/webpack/lib/webpack.js
- /app/webb-monorepo/node_modules/webpack/lib/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/config.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
- /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
- /app/webb-monorepo/node_modules/nx/src/command-line/run.js
- /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/app/webb-monorepo/apps/stats-dapp/src/pages/AuthoritiesHistory.tsx:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at requireFromString (/app/webb-monorepo/node_modules/require-from-string/index.js:28:4)
    at requireFromString (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:35:47)
    at getReplacement (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/helpers.js:58:18)
    at PluginPass.ImportDeclaration (/app/webb-monorepo/node_modules/babel-plugin-preval/dist/index.js:141:57)
 @ ./src/routes/index.tsx 21:9-66
 @ ./src/App.tsx 7:0-34 18:12-18
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/Accordion.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
 @ ../../libs/webb-ui-components/src/components/Accordion/index.ts 3:0-28 3:0-28
 @ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionButton.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
 @ ../../libs/webb-ui-components/src/components/Accordion/index.ts 4:0-34 4:0-34
 @ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionContent.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
 @ ../../libs/webb-ui-components/src/components/Accordion/index.ts 5:0-35 5:0-35
 @ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Accordion/AccordionItem.tsx 10:0-64
Module not found: Error: Can't resolve '@radix-ui/react-accordion' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Accordion'
 @ ../../libs/webb-ui-components/src/components/Accordion/index.ts 6:0-32 6:0-32
 @ ../../libs/webb-ui-components/src/components/index.ts 3:0-28 3:0-28
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/Popover.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
 @ ../../libs/webb-ui-components/src/components/Popover/index.ts 3:0-26 3:0-26
 @ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverArrow.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
 @ ../../libs/webb-ui-components/src/components/Popover/index.ts 4:0-31 4:0-31
 @ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverClose.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
 @ ../../libs/webb-ui-components/src/components/Popover/index.ts 5:0-31 5:0-31
 @ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverContent.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
 @ ../../libs/webb-ui-components/src/components/Popover/index.ts 6:0-33 6:0-33
 @ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/Popover/PopoverTrigger.tsx 8:0-60
Module not found: Error: Can't resolve '@radix-ui/react-popover' in '/app/webb-monorepo/libs/webb-ui-components/src/components/Popover'
 @ ../../libs/webb-ui-components/src/components/Popover/index.ts 7:0-33 7:0-33
 @ ../../libs/webb-ui-components/src/components/index.ts 40:0-26 40:0-26
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/components/ScrollArea/ScrollArea.tsx 13:0-67
Module not found: Error: Can't resolve '@radix-ui/react-scroll-area' in '/app/webb-monorepo/libs/webb-ui-components/src/components/ScrollArea'
 @ ../../libs/webb-ui-components/src/components/ScrollArea/index.ts 3:0-29 3:0-29
 @ ../../libs/webb-ui-components/src/components/FileUploads/FileUploadList.tsx 12:0-43 20:42-52
 @ ../../libs/webb-ui-components/src/components/FileUploads/index.ts 6:0-33 6:0-33
 @ ../../libs/webb-ui-components/src/components/index.ts 23:0-30 23:0-30
 @ ../../libs/webb-ui-components/src/index.ts 3:0-29 3:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ../../libs/webb-ui-components/src/containers/TransactionProgressCard/TransactionProgressCard.tsx 17:0-34
Module not found: Error: Can't resolve 'lottie-react' in '/app/webb-monorepo/libs/webb-ui-components/src/containers/TransactionProgressCard'
 @ ../../libs/webb-ui-components/src/containers/TransactionProgressCard/index.ts 4:0-42 4:0-42
 @ ../../libs/webb-ui-components/src/containers/index.ts 8:0-42 8:0-42
 @ ../../libs/webb-ui-components/src/index.ts 4:0-29 4:0-29
 @ ./src/App.tsx 6:0-64 9:42-56
 @ ./src/index.tsx 7:0-24 10:46-49

ERROR in ./styles.css (../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./styles.css)
Module build failed (from ../../node_modules/postcss-loader/dist/cjs.js):
Error: Cannot find module '@webb-tools/tailwind-preset'
Require stack:
- /app/webb-monorepo/apps/stats-dapp/tailwind.config.js
- /app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js
- /app/webb-monorepo/node_modules/tailwindcss/lib/index.js
- /app/webb-monorepo/apps/stats-dapp/webpack.config.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/webpack/custom-webpack.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/executors/dev-server/dev-server.impl.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
- /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
- /app/webb-monorepo/node_modules/nx/src/command-line/run.js
- /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/app/webb-monorepo/apps/stats-dapp/tailwind.config.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
 @ ./styles.css 8:6-276 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-246 83:0-246 84:22-29 84:33-47 84:50-64 61:4-74:5
 @ ./src/index.tsx 4:0-23

ERROR in ../../libs/webb-ui-components/src/tailwind.css (../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!../../libs/webb-ui-components/src/tailwind.css)
Module build failed (from ../../node_modules/postcss-loader/dist/cjs.js):
Error: Cannot find module '@webb-tools/tailwind-preset'
Require stack:
- /app/webb-monorepo/libs/webb-ui-components/tailwind.config.js
- /app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js
- /app/webb-monorepo/node_modules/tailwindcss/lib/index.js
- /app/webb-monorepo/apps/stats-dapp/webpack.config.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/utils/webpack/custom-webpack.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/src/executors/dev-server/dev-server.impl.js
- /app/webb-monorepo/node_modules/@nrwl/web/node_modules/@nrwl/webpack/index.js
- /app/webb-monorepo/node_modules/@nrwl/web/src/executors/dev-server/dev-server.impl.js
- /app/webb-monorepo/node_modules/nx/src/config/workspaces.js
- /app/webb-monorepo/node_modules/nx/src/command-line/run.js
- /app/webb-monorepo/node_modules/nx/bin/run-executor.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/app/webb-monorepo/libs/webb-ui-components/tailwind.config.js:3:16)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at getTailwindConfig (/app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:67:53)
    at /app/webb-monorepo/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:96:92
    at /app/webb-monorepo/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11
    at plugins (/app/webb-monorepo/node_modules/tailwindcss/lib/index.js:38:63)
    at LazyResult.runOnRoot (/app/webb-monorepo/node_modules/postcss/lib/lazy-result.js:339:16)
    at LazyResult.runAsync (/app/webb-monorepo/node_modules/postcss/lib/lazy-result.js:393:26)
    at async Object.loader (/app/webb-monorepo/node_modules/postcss-loader/dist/index.js:95:14)
 @ ../../libs/webb-ui-components/src/tailwind.css 8:6-287 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-257 83:0-257 84:22-29 84:33-47 84:50-64 61:4-74:5
 @ ./src/index.tsx 5:0-53

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Jan 13, 2023

@ltfschoen thanks for the contribution! Consider:

  • I think it would be best to move the ./docker-dev.sh script, and docker-compose file to the docker folder and adding a README there with instructions, useful commands as done in the root README

In addition, I was able to build the docker container fine with the provided instructions but failed to serve both the bridge-dapp and stats-dapp. Since I ran this on macos the fallback namespaces were used so perhaps that might be a potential cause but not entirely sure? Error logs for each provided below.

bridge-dapp log

Serving bridge-dapp error log

ERROR in ./src/index.tsx
Module build failed (from ../../node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
Unknown option: .assumptions. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.

    at throwUnknownError (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:124:27)
    at /app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:109:5
    at Array.forEach (<anonymous>)
    at validateNested (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:85:21)
    at validate (/app/webb-monorepo/node_modules/@babel/core/lib/config/validation/options.js:76:10)
    at loadPrivatePartialConfig (/app/webb-monorepo/node_modules/@babel/core/lib/config/partial.js:78:50)
    at loadPrivatePartialConfig.next (<anonymous>)
    at Function.<anonymous> (/app/webb-monorepo/node_modules/@babel/core/lib/config/partial.js:140:25)
    at Generator.next (<anonymous>)
    at evaluateSync (/app/webb-monorepo/node_modules/gensync/index.js:251:28)

webpack 5.75.0 compiled with 1 error in 1156 ms

Stats-dapp log

Serving stats-dapp error log

yes, then it would be consistent with how its done here https://github.com/paritytech/substrate/tree/master/docker
maybe the .assumptions error is because need to update to Babel 7.13 https://babeljs.io/docs/en/assumptions?
i'm assuming you only used code in this branch, where in package.json it uses "@babel/core": "7.12.13", but in the repo's 'develop' branch a newer version "@babel/core": "7.18.6", is being used. however we're still using "babel-core": "^7.0.0-bridge.0", in resolutions.
i wonder if rebasing this branch with latest changes in this repo's develop branch would help?

i just had a look at your errors and tried it on my macOS too and i was able to replicate your error.

unfortunately it takes a lot longer on my local macOS machine that has old Catalina and its only an i5 dual-core and i also have a slow internet connection (40 Mbps, much slower than the 40Gbps i get using cloud provider connections where i've been testing it on Ubuntu) and its necessary to build these large docker images first:

webb-dapp-dev   latest           c6b223f6d761   24 minutes ago   14.8GB
<none>          <none>           6113c91b81c3   2 hours ago      14.8GB
<none>          <none>           c28d2329c403   9 hours ago      5.33GB
node            gallium-alpine   0e1140518c5f   4 days ago       118MB

anyway i found that on my machine i had permissions issues and xcode command line tools were missing so i had to:

sudo chown -R $(whoami) /usr/local/etc /usr/local/share /usr/local/var /usr/local/Cellar
chmod u+w /usr/local/etc /usr/local/share /usr/local/var /usr/local/Cellar
xcode-select --install

the changes i made are here https://github.com/ltfschoen/webb-dapp/pull/1/files
but then i got a different error to you when running the bridge dapp Cannot find module '@babel/plugin-syntax-import-assertions', and the changes i made didn't help resolve the error.

i think the only feasible way i'd be able to further investigate this issue is if i found a cloud provider that allows use of a macOS instance. unfortunately it just takes far too long on my local machine and it crashed it today and i'd need to setup an external ssd specifically to store the docker images as i'm low on space.
aws allows use of mac1.metal or mac2.metal but they're not cheap and i'm not on a free tier. https://devdosvid.blog/2021/01/19/mac1.metal-and-mac2.metal-ec2-instances-user-experience/

i wonder if i could use Golem to use someone else's cheaper

@dutterbutter
Copy link
Contributor

@ltfschoen I am going to close this since its become stale. Please feel free to open back up if you pick it up again. Thanks!

@ltfschoen
Copy link
Contributor Author

ltfschoen commented Aug 8, 2023

i just got a new macOS computer, so i'm curious to try webb again and try an attempt this issue again if you think it'd provide some value. from memory the problem with this PR was this comment was not yet resolved when @dutterbutter tried it on macOS #848 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants