You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if this is outside the scope of this repo, but I encounter typescript issue when building with Docker. I tried versions 0.45.3 through 0.45.9 of @cosmos-client/core.
Docker file looks like this:
FROM node:16-alpine
WORKDIR /app
COPY package.json ./
# RUN npm install @cosmos-client/core
RUN yarn
COPY tsconfig.json ./
COPY src/. src/.
RUN yarn build
ENV PORT='9000'
EXPOSE 9000
COPY .env ./
CMD ["node", "./build/main.js"]
and I get these errors on Mac and Google Cloud Run, but only when transpiling in Docker:
=> ERROR [7/8] RUN yarn build 3.0s
------
> [7/8] RUN yarn build:
#11 0.262 yarn run v1.22.19
#11 0.282 $ npx tsc
#11 2.912 src/wallets/myFile.ts(48,58): error TS2339: Property 'unpackCosmosAny' does not exist on type 'typeof import("/app/node_modules/@cosmos-client/core/cjs/types/codec/module")'.
#11 2.913 src/wallets/myFile.ts(120,33): error TS2339: Property 'Long' does not exist on type 'typeof import("/app/node_modules/@cosmos-client/core/cjs/module")'.
#11 2.913 src/wallets/myFile.ts(125,37): error TS2339: Property 'packAny' does not exist on type 'typeof import("/app/node_modules/@cosmos-client/core/cjs/types/codec/module")'.
#11 2.913 src/wallets/myFile.ts(127,53): error TS2339: Property 'Long' does not exist on type 'typeof import("/app/node_modules/@cosmos-client/core/cjs/module")'.
#11 2.913 src/wallets/myFile.ts(149,34): error TS2339: Property 'packAny' does not exist on type 'typeof import("/app/node_modules/@cosmos-client/core/cjs/types/codec/module")'.
#11 2.913 src/wallets/myFile.ts(166,26): error TS2694: Namespace '"/app/node_modules/@cosmos-client/core/cjs/module"' has no exported member 'Long'.
#11 2.913 src/wallets/myFile.ts(167,27): error TS2694: Namespace '"/app/node_modules/@cosmos-client/core/cjs/module"' has no exported member 'Long'.
Apologies if this is outside the scope of this repo, but I encounter typescript issue when building with Docker. I tried versions 0.45.3 through 0.45.9 of @cosmos-client/core.
Docker file looks like this:
and I get these errors on Mac and Google Cloud Run, but only when transpiling in Docker:
Using Node 16 and TS 4.5.2.
Docker version
Transpiling the project outside docker works like a charm. If I found a solution, I will post it here.
The text was updated successfully, but these errors were encountered: