Comments (8)
Well, I close this as my issue is indeed resolved.
Anybody looking for the solution - pay attention to contents of your build arguments, make sure that they point to where the README says they should, and that those URLs are available from your build environment.
from storefront.
@mmiszy Hello, it looks like that this is your level of expertise.
from storefront.
I am having this same issue. I have followed the directions: cloned the repo, cp .env.example to .env, I have run pnpm i. When I create a docker image of this repo it fails with the same reason/text/error above from original poster. I saw also that the .env file was being ignored by the .gitignore file and even changing this does not fix it. It has been 3 years since I worked with a saleor store and I am not sure what I could be doing wrong since the directions seem simple enough to follow. I have used this process for Saleor and Dashboard and they create the docker images without any errors.
2024-01-10T16:04:12Z > [builder 6/6] RUN pnpm build:
2024-01-10T16:04:12Z #22 1.681 > pnpm run generate
2024-01-10T16:04:12Z #22 1.681
2024-01-10T16:04:12Z #22 2.895
2024-01-10T16:04:12Z #22 2.895 > [email protected] generate /app
2024-01-10T16:04:12Z #22 2.895 > graphql-codegen --config .graphqlrc.ts
2024-01-10T16:04:12Z #22 2.895
2024-01-10T16:04:12Z #22 5.155 Before GraphQL types can be generated, you need to set NEXT_PUBLIC_SALEOR_API_URL environment variable.
2024-01-10T16:04:12Z #22 5.157 Follow development instructions in the README.md file.
2024-01-10T16:04:12Z #22 5.223 ELIFECYCLE Command failed with exit code 1.
2024-01-10T16:04:12Z #22 5.246 ELIFECYCLE Command failed with exit code 1.
2024-01-10T16:04:12Z ------
2024-01-10T16:04:12Z ERROR: failed to solve: executor failed running [/bin/sh -c pnpm build]: exit code: 1
2024-01-10T16:04:12Z Build failed using Buildkit (1)
I have this being built within the hub.docker system straight from my GitHub repo.
I understand that I have to run the container with arguments and env variables but if the container itself will not build in the docker system there is no way to run the image using with the arguments such as NEXT_PUBLIC_SALEOR_API_URL.
I got this same error when running this from my M2 Mac and as soon as I specify this variable in my terminal it runs without any issue.
from storefront.
@matejak Were you ever able to resolve this?
from storefront.
I have even specified these in the build variables section of the hub.docker system and the build still fails. I don't understand why the other 2 images (Saleor 3.18 and Dashboard 3.18) will build correctly but this one does not.
from storefront.
Thank you for the pointer, I have set the build args incorrectly, and I got no complaints, however the build has failed in that weird way. With correct build arguments, it works :-)
I wouldn't say that the issue is fixed or invalid, as a small typo can lead one completely astray.
@jdmueller I guess that what you are after are build arguments, and not env variables. Env vars are overriden with build args in the Dockerfile. I am not familiar with the build system that you are using though.
from storefront.
@matejak I am using the hub.docker.com system that automatically generates an image file from my GitHub responistory whenever there is a push to the master. This builds a new image automatically and I can just restart the service and it automatically runs the new build. I have found this to work great for everything. And it works for the other 2 repos from saleor, but for some reason not this one. It even builds the image correctly without changing the .env file from .env.example. I just don't have enough experience with docker to understand what is going on or why it wouldn't even build the image. I haven't even tried to run it yet.
from storefront.
So I have created a new issue that specifies my problem since it sounds like the issue should be closed as you were able to figure out your problem. My issue is more specific to hub.docker.com.
from storefront.
Related Issues (20)
- Fix spacing in checkout page
- Parametrize GraphQL queries to allow passing channel
- Pass current channel in URL HOT 2
- Order List: Finalise payments for non-paid orders
- Add Dockerfile HOT 1
- Migrate Auth to App Router in Storefront HOT 1
- Check metabase Slack notifiacations and define one for storefront
- Bug: `update types workflow` is missing `schema.graphql`
- Rename current channels to `us` and `eu`
- Cookie cause bug HOT 1
- The product is still Out Of Stock in a storefront, even if there is 1 item in each warehouse
- Add env variable for default channel HOT 2
- Account login not working HOT 2
- Docker Build Error ARG or ENV missing during build process NEXT_PUBLIC_SALEOR_API_URL HOT 3
- image src not correct
- how to set NEXT_PUBLIC_SALEOR_API_URL HOT 1
- Checkout with logged user from /login page not detected on checkout flow
- can not integrate Web3modal into saleor/storefront adding config file and context file from web3modal make the loading of checkout page fail
- incorrect hostname for :8000 ist used to fetch data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storefront.