saleor / saleor-storefront

A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
https://demo.saleor.io/
BSD 3-Clause "New" or "Revised" License
769 stars 672 forks source link

Error in storefront not open #1070

Open ionut98G opened 3 years ago

ionut98G commented 3 years ago

image

mehrdad-shokri commented 3 years ago

@ionut98G please provide more context to this so we can help. what have you run? your environment?

ionut98G commented 3 years ago

I have this error image

mehrdad-shokri commented 3 years ago

@ionut98G do you have a file named .env at root?

ionut98G commented 3 years ago

No

ionut98G commented 3 years ago

I have this file: image

mehrdad-shokri commented 3 years ago

That's Dockerfile. create a file named .env and put content as this:

# common envs
NEXT_PUBLIC_API_URI=http://localhost:8000/graphql/ #your saleor api url
NEXT_PUBLIC_SALEOR_CHANNEL_SLUG=default-channel
NEXT_PUBLIC_DEMO_MODE=false
NEXT_PUBLIC_GTM_ID=
NEXT_PUBLIC_SENTRY_APM=0
NEXT_PUBLIC_SENTRY_DSN=
# ssr envs
INCREMENTAL_STATIC_REGENERATION_REVALIDATE=3600 # 1 hour
NEXT_PUBLIC_STATIC_PATHS_FALLBACK=blocking
ionut98G commented 3 years ago

In storefront folder?

mehrdad-shokri commented 3 years ago

yes

mehrdad-shokri commented 3 years ago

please update NEXT_PUBLIC_API_URI to your saleor api url

ionut98G commented 3 years ago

image Same error...

mehrdad-shokri commented 3 years ago

you need to run npm run build before npm start

ionut98G commented 3 years ago

image

mehrdad-shokri commented 3 years ago

I don't know reason of this error sorry

frediian commented 3 years ago

in Windows: i use nvs, uninstall node from programs and use nvs for install the version that required in stable and master release, then run again the same command

and this is the result

image

i put the file .env install all dependencies , and dont run the storefront

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.