You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to run app2 on docker and it does depend on common. The docker build fails because can not find the module: error TS2307: Cannot find module 'common' or its corresponding type declarations.
# syntax = docker/dockerfile:1.0-experimentalFROM node:16
ENV PNPM_HOME="/pnpm"ENV PATH="$PNPM_HOME:$PATH"RUN corepack enable
RUN corepack prepare pnpm@v8.15.8 --activate
WORKDIR /user/src/app
COPY . .
RUN mkdir -p -m 600 ../common
COPY package*.json ./
COPY-common-0.0.1.tgz .
RUN tar -xzf ./-common-0.0.1.tgz -C ../common
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install
RUN pnpm run build
RUN pnpm run test
ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init
RUN chmod +x /usr/local/bin/dumb-init
ENTRYPOINT ["dumb-init", "--"]
CMD ["pnpm", "run", "start-docker"]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The structure:
I want to run
app2
on docker and it does depend oncommon
. The docker build fails because can not find the module:error TS2307: Cannot find module 'common' or its corresponding type declarations.
Beta Was this translation helpful? Give feedback.
All reactions