We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Getting error when running cloudmos/api (https://github.com/akash-network/cloudmos/tree/main/api) from Dockerfile as well as from npm directly.
The error is something like Module not found: Error: Can't resolve '@shared/xxx'
Module not found: Error: Can't resolve '@shared/xxx'
is it related to https://github.com/akash-network/cloudmos/tree/main/shared repo?
The full error log from docker is below.
[+] Building 18.7s (12/12) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 273B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/node:18-alpine 1.7s => [1/8] FROM docker.io/library/node:18-alpine@sha256:b1a0356f7d6b86c958a06949d3db3f7fb27f95f627aa6157cb98bc65c801efa2 0.0s => [internal] load build context 0.0s => => transferring context: 3.07kB 0.0s => CACHED [2/8] WORKDIR /app 0.0s => CACHED [3/8] COPY . . 0.0s => CACHED [4/8] WORKDIR /app/shared 0.0s => CACHED [5/8] RUN npm ci 0.0s => CACHED [6/8] WORKDIR /app/api 0.0s => CACHED [7/8] RUN npm ci 0.0s => ERROR [8/8] RUN npm run build 16.8s ------ > [8/8] RUN npm run build: 0.783 0.783 > cloudmos-api@2.11.1 build 0.783 > webpack --config webpack.prod.js 0.783 16.68 assets by status 113 KiB [cached] 1 asset 16.68 cacheable modules 208 KiB 42 modules 16.68 modules by path external "@akashnetwork/akashjs/build/protobuf/akash/ 1010 bytes 16.68 modules by path external "@akashnetwork/akashjs/build/protobuf/akash/market/ 336 bytes 8 modules 16.68 modules by path external "@akashnetwork/akashjs/build/protobuf/akash/deployment/ 252 bytes 6 modules 16.68 modules by path external "@akashnetwork/akashjs/build/protobuf/akash/audit/ 126 bytes 3 modules 16.68 modules by path external "@akashnetwork/akashjs/build/protobuf/akash/cert/ 126 bytes 3 modules 16.68 modules by path external "@akashnetwork/akashjs/build/protobuf/akash/provider/ 126 bytes 3 modules 16.68 external "@akashnetwork/akashjs/build/protobuf/akash/base/v1beta3/storage" 42 bytes [built] [code generated] 16.68 modules by path external "@cosmjs/ 168 bytes 16.68 external "@cosmjs/crypto" 42 bytes [built] [code generated] 16.68 external "@cosmjs/encoding" 42 bytes [built] [code generated] 16.68 external "@cosmjs/proto-signing" 42 bytes [built] [code generated] 16.68 external "@cosmjs/stargate" 42 bytes [built] [code generated] 16.68 + 24 modules 16.68 16.68 ERROR in ./src/db/blocksProvider.ts 13:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 17:25-58 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/blocksProvider.ts 14:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 17:25-58 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/dbConnection.ts 17:20-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas' in '/app/src/db' 16.68 @ ./src/index.ts 46:23-51 16.68 16.68 ERROR in ./src/db/dbConnection.ts 18:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/db' 16.68 @ ./src/index.ts 46:23-51 16.68 16.68 ERROR in ./src/db/dbConnection.ts 19:27-62 16.68 Module not found: Error: Can't resolve '@shared/chainDefinitions' in '/app/src/db' 16.68 @ ./src/index.ts 46:23-51 16.68 16.68 ERROR in ./src/db/deploymentProvider.ts 14:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 32:29-66 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/deploymentProvider.ts 15:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 32:29-66 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/deploymentProvider.ts 17:20-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 32:29-66 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/networkRevenueProvider.ts 25:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db' 16.68 @ ./src/routers/web3indexRouter.ts 17:33-74 16.68 @ ./src/index.ts 43:26-62 16.68 16.68 ERROR in ./src/db/networkRevenueProvider.ts 26:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db' 16.68 @ ./src/routers/web3indexRouter.ts 17:33-74 16.68 @ ./src/index.ts 43:26-62 16.68 16.68 ERROR in ./src/db/providerDataProvider.ts 13:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 31:31-70 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/statsProvider.ts 13:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 22:24-56 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/statsProvider.ts 14:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 22:24-56 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/templateProvider.ts 32:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/db' 16.68 @ ./src/routers/userRouter.ts 40:27-62 16.68 @ ./src/index.ts 42:21-52 16.68 16.68 ERROR in ./src/db/transactionsProvider.ts 13:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 19:31-70 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/db/transactionsProvider.ts 14:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/db' 16.68 @ ./src/routers/apiRouter.ts 19:31-70 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/providers/apiNodeProvider.ts 23:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/base' in '/app/src/providers' 16.68 @ ./src/routers/apiRouter.ts 20:26-67 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/providers/apiNodeProvider.ts 25:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/providers' 16.68 @ ./src/routers/apiRouter.ts 20:26-67 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/providers/providerStatusProvider.ts 13:16-50 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash' in '/app/src/providers' 16.68 @ ./src/routers/apiRouter.ts 21:33-81 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/providers/providerStatusProvider.ts 14:27-78 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/akash/providerSnapshot' in '/app/src/providers' 16.68 @ ./src/routers/apiRouter.ts 21:33-81 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in ./src/providers/stripeProvider.ts 16:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/providers' 16.68 @ ./src/routers/userRouter.ts 41:25-65 16.68 @ ./src/index.ts 42:21-52 16.68 16.68 ERROR in ./src/providers/userDataProvider.ts 13:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/providers' 16.68 @ ./src/routers/userRouter.ts 37:27-69 16.68 @ ./src/index.ts 42:21-52 16.68 16.68 ERROR in ./src/routers/dashboardRouter.ts 16:15-48 16.68 Module not found: Error: Can't resolve '@shared/dbSchemas/user' in '/app/src/routers' 16.68 @ ./src/index.ts 47:26-62 16.68 16.68 ERROR in /app/src/db/blocksProvider.ts 16.68 ./src/db/blocksProvider.ts 1:61-86 16.68 [tsl] ERROR in /app/src/db/blocksProvider.ts(1,62) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 17:25-58 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/blocksProvider.ts 16.68 ./src/db/blocksProvider.ts 2:39-63 16.68 [tsl] ERROR in /app/src/db/blocksProvider.ts(2,40) 16.68 TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 17:25-58 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/dbConnection.ts 16.68 ./src/db/dbConnection.ts 5:56-75 16.68 [tsl] ERROR in /app/src/db/dbConnection.ts(5,57) 16.68 TS2307: Cannot find module '@shared/dbSchemas' or its corresponding type declarations. 16.68 @ ./src/index.ts 46:23-51 16.68 16.68 ERROR in /app/src/db/dbConnection.ts 16.68 ./src/db/dbConnection.ts 6:73-97 16.68 [tsl] ERROR in /app/src/db/dbConnection.ts(6,74) 16.68 TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations. 16.68 @ ./src/index.ts 46:23-51 16.68 16.68 ERROR in /app/src/db/dbConnection.ts 16.68 ./src/db/dbConnection.ts 7:33-59 16.68 [tsl] ERROR in /app/src/db/dbConnection.ts(7,34) 16.68 TS2307: Cannot find module '@shared/chainDefinitions' or its corresponding type declarations. 16.68 @ ./src/index.ts 46:23-51 16.68 16.68 ERROR in /app/src/db/deploymentProvider.ts 16.68 ./src/db/deploymentProvider.ts 4:28-52 16.68 [tsl] ERROR in /app/src/db/deploymentProvider.ts(4,29) 16.68 TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 32:29-66 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/deploymentProvider.ts 16.68 ./src/db/deploymentProvider.ts 5:34-59 16.68 [tsl] ERROR in /app/src/db/deploymentProvider.ts(5,35) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 32:29-66 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/deploymentProvider.ts 16.68 ./src/db/deploymentProvider.ts 7:31-50 16.68 [tsl] ERROR in /app/src/db/deploymentProvider.ts(7,32) 16.68 TS2307: Cannot find module '@shared/dbSchemas' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 32:29-66 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/networkRevenueProvider.ts 16.68 ./src/db/networkRevenueProvider.ts 2:20-44 16.68 [tsl] ERROR in /app/src/db/networkRevenueProvider.ts(2,21) 16.68 TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations. 16.68 @ ./src/routers/web3indexRouter.ts 17:33-74 16.68 @ ./src/index.ts 43:26-62 16.68 16.68 ERROR in /app/src/db/networkRevenueProvider.ts 16.68 ./src/db/networkRevenueProvider.ts 3:36-61 16.68 [tsl] ERROR in /app/src/db/networkRevenueProvider.ts(3,37) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/web3indexRouter.ts 17:33-74 16.68 @ ./src/index.ts 43:26-62 16.68 16.68 ERROR in /app/src/db/providerDataProvider.ts 16.68 ./src/db/providerDataProvider.ts 1:44-69 16.68 [tsl] ERROR in /app/src/db/providerDataProvider.ts(1,45) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 31:31-70 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/statsProvider.ts 16.68 ./src/db/statsProvider.ts 1:20-44 16.68 [tsl] ERROR in /app/src/db/statsProvider.ts(1,21) 16.68 TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 22:24-56 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/statsProvider.ts 16.68 ./src/db/statsProvider.ts 2:36-61 16.68 [tsl] ERROR in /app/src/db/statsProvider.ts(2,37) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 22:24-56 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/templateProvider.ts 16.68 ./src/db/templateProvider.ts 1:56-80 16.68 [tsl] ERROR in /app/src/db/templateProvider.ts(1,57) 16.68 TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations. 16.68 @ ./src/routers/userRouter.ts 40:27-62 16.68 @ ./src/index.ts 42:21-52 16.68 16.68 ERROR in /app/src/db/transactionsProvider.ts 16.68 ./src/db/transactionsProvider.ts 1:46-70 16.68 [tsl] ERROR in /app/src/db/transactionsProvider.ts(1,47) 16.68 TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 19:31-70 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/db/transactionsProvider.ts 16.68 ./src/db/transactionsProvider.ts 2:61-86 16.68 [tsl] ERROR in /app/src/db/transactionsProvider.ts(2,62) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 19:31-70 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/providers/apiNodeProvider.ts 16.68 ./src/providers/apiNodeProvider.ts 7:26-50 16.68 [tsl] ERROR in /app/src/providers/apiNodeProvider.ts(7,27) 16.68 TS2307: Cannot find module '@shared/dbSchemas/base' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 20:26-67 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/providers/apiNodeProvider.ts 16.68 ./src/providers/apiNodeProvider.ts 9:44-69 16.68 [tsl] ERROR in /app/src/providers/apiNodeProvider.ts(9,45) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 20:26-67 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/providers/providerStatusProvider.ts 16.68 ./src/providers/providerStatusProvider.ts 1:72-97 16.68 [tsl] ERROR in /app/src/providers/providerStatusProvider.ts(1,73) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 21:33-81 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/providers/providerStatusProvider.ts 16.68 ./src/providers/providerStatusProvider.ts 2:33-75 16.68 [tsl] ERROR in /app/src/providers/providerStatusProvider.ts(2,34) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash/providerSnapshot' or its corresponding type declarations. 16.68 @ ./src/routers/apiRouter.ts 21:33-81 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 ERROR in /app/src/providers/stripeProvider.ts 16.68 ./src/providers/stripeProvider.ts 1:28-52 16.68 [tsl] ERROR in /app/src/providers/stripeProvider.ts(1,29) 16.68 TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations. 16.68 @ ./src/routers/userRouter.ts 41:25-65 16.68 @ ./src/index.ts 42:21-52 16.68 16.68 ERROR in /app/src/providers/stripeProvider.ts 16.68 ./src/providers/stripeProvider.ts 2:25-40 16.68 [tsl] ERROR in /app/src/providers/stripeProvider.ts(2,26) 16.68 TS2307: Cannot find module '@shared/plans' or its corresponding type declarations. 16.68 @ ./src/routers/userRouter.ts 41:25-65 16.68 @ ./src/index.ts 42:21-52 16.68 16.68 ERROR in /app/src/providers/userDataProvider.ts 16.68 ./src/providers/userDataProvider.ts 1:45-69 16.68 [tsl] ERROR in /app/src/providers/userDataProvider.ts(1,46) 16.68 TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations. 16.68 @ ./src/routers/userRouter.ts 37:27-69 16.68 @ ./src/index.ts 42:21-52 16.68 16.68 ERROR in /app/src/routers/dashboardRouter.ts 16.68 ./src/routers/dashboardRouter.ts 1:38-62 16.68 [tsl] ERROR in /app/src/routers/dashboardRouter.ts(1,39) 16.68 TS2307: Cannot find module '@shared/dbSchemas/user' or its corresponding type declarations. 16.68 @ ./src/index.ts 47:26-62 16.68 16.68 ERROR in /app/src/utils/map/provider.ts 16.68 ./src/utils/map/provider.ts 1:25-50 16.68 [tsl] ERROR in /app/src/utils/map/provider.ts(1,26) 16.68 TS2307: Cannot find module '@shared/dbSchemas/akash' or its corresponding type declarations. 16.68 @ ./src/providers/providerStatusProvider.ts 18:19-53 16.68 @ ./src/routers/apiRouter.ts 21:33-81 16.68 @ ./src/index.ts 41:20-50 16.68 16.68 48 errors have detailed information that is not shown. 16.68 Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it. 16.68 16.68 webpack 5.78.0 compiled with 48 errors in 14783 ms ------ Dockerfile:16 -------------------- 14 | WORKDIR /app/api 15 | RUN npm ci 16 | >>> RUN npm run build 17 | 18 | EXPOSE 80 -------------------- ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
The text was updated successfully, but these errors were encountered:
Closing since this is captured in #118
Sorry, something went wrong.
No branches or pull requests
Getting error when running cloudmos/api (https://github.com/akash-network/cloudmos/tree/main/api) from Dockerfile as well as from npm directly.
The error is something like
Module not found: Error: Can't resolve '@shared/xxx'
is it related to https://github.com/akash-network/cloudmos/tree/main/shared repo?
The full error log from docker is below.
The text was updated successfully, but these errors were encountered: