storefront
storefront copied to clipboard
Failed to compile @saleor/checkout-storefront
Summary
Hello, I am facing a strange issue using dev dockerfile. I can locally use it but cannot in deployed in "dev environement:
./pages/checkout-spa.tsx:5:27
Module not found: Can't resolve '@saleor/checkout-storefront'
3 | const CheckoutStoreFront = Dynamic(
4 | async () => {
> 5 | const { Root } = await import("@saleor/checkout-storefront");
| ^
6 | return Root;
7 | },
8 | {
https://nextjs.org/docs/messages/module-not-found
I just want to run saleor-app-checkout
ARG NODE_VERSION=16
ARG ALPINE_VERSION=3.15
FROM node:${NODE_VERSION}-alpine${ALPINE_VERSION}
WORKDIR /app
# Setup proxy to API used in saleor-platform
# RUN apt-get update && apt-get install -y nginx
# COPY ./nginx/dev.conf /etc/nginx/conf.d/default.conf
ARG NEXT_PUBLIC_STOREFRONT_NAME
ARG NEXT_PUBLIC_HOMEPAGE_MENU
ARG NEXT_PUBLIC_DEMO_MODE
ARG NEXT_PUBLIC_GEOLOCATION
ARG NEXT_PUBLIC_ALLOWED_IMAGE_DOMAINS
ARG NEXT_PUBLIC_IMAGE_CONVERSION_FORMATS
ARG NEXT_PUBLIC_API_URI
ARG NEXT_PUBLIC_DEFAULT_CHANNEL
ARG NEXT_PUBLIC_VERCEL_URL
ENV NEXT_PUBLIC_STOREFRONT_NAME=${NEXT_PUBLIC_STOREFRONT_NAME}
ENV NEXT_PUBLIC_HOMEPAGE_MENU=${NEXT_PUBLIC_HOMEPAGE_MENU}
ENV NEXT_PUBLIC_DEMO_MODE=${NEXT_PUBLIC_DEMO_MODE}
ENV NEXT_PUBLIC_GEOLOCATION=${NEXT_PUBLIC_GEOLOCATION}
ENV NEXT_PUBLIC_ALLOWED_IMAGE_DOMAINS=${NEXT_PUBLIC_ALLOWED_IMAGE_DOMAINS}
ENV NEXT_PUBLIC_IMAGE_CONVERSION_FORMATS=${NEXT_PUBLIC_IMAGE_CONVERSION_FORMATS}
ENV NEXT_PUBLIC_API_URI=${NEXT_PUBLIC_API_URI:-http:/localhost:8000/graphql/}
ENV NEXT_PUBLIC_DEFAULT_CHANNEL ${NEXT_PUBLIC_DEFAULT_CHANNEL:-default-channel}
ENV NEXT_TELEMETRY_DISABLED 1
# Setup pnpm package manager
RUN npm install --location=global [email protected]
COPY . .
RUN pnpm install
ARG SALEOR_API_URL
ENV SALEOR_API_URL ${SALEOR_API_URL:-http://localhost:8000/graphql/}
EXPOSE 3001
CMD pnpm turbo run dev --parallel --cache-dir=.turbo --filter=saleor-app-checkout
What goes wrong ?
Steps to reproduce
- Building the Dockerfile above
- Run it
- Got to root page
A link to a reproduction repository
No response
Output from envinfo
No response
Hello @slamer59 👋
Where is the Dockerfile coming from?
Hello, Its custom. Derived from this repo.
This won't work because you're only running saleor-app-checkout (--filter=saleor-app-checkout
). @saleor/checkout-storefront
is not a part of it.
You should be running at least saleor app checkout and all its dependencies via the ...
operator from turbo:
--filter=saleor-app-checkout...
Let me know if this helps. However, in general, we're unable to provide help with code that didn't come from us - i.e. a custom Dockerfile.
This issue had no activity for more than 90 days. Labelling as stale.
It'll be automatically closed withing 30 days of no activity.
Closing due to lack of activity.