question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to load next.config.js

See original GitHub issue

How I ended up here

  1. Cloned the repo
  2. Added .env.local
  3. cd site and yarn dev

.env.local 👇🏻

# Available providers:
# @vercel/commerce-local
# @vercel/commerce-bigcommerce
# @vercel/commerce-shopify
# @vercel/commerce-swell
# @vercel/commerce-saleor
# @vercel/commerce-spree
# @vercel/commerce-ordercloud
# @vercel/commerce-vendure
# @vercel/commerce-kibocommerce
# @vercel/commerce-commercejs
COMMERCE_PROVIDER=@vercel/commerce-vendure

BIGCOMMERCE_STOREFRONT_API_URL=
BIGCOMMERCE_STOREFRONT_API_TOKEN=
BIGCOMMERCE_STORE_API_URL=
BIGCOMMERCE_STORE_API_TOKEN=
BIGCOMMERCE_STORE_API_CLIENT_ID=
BIGCOMMERCE_CHANNEL_ID=
BIGCOMMERCE_STORE_URL=
BIGCOMMERCE_STORE_API_STORE_HASH=
BIGCOMMERCE_STORE_API_CLIENT_SECRET=


NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN=
NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=

NEXT_PUBLIC_SWELL_STORE_ID=
NEXT_PUBLIC_SWELL_PUBLIC_KEY=

NEXT_PUBLIC_SALEOR_API_URL=
NEXT_PUBLIC_SALEOR_CHANNEL=

NEXT_PUBLIC_VENDURE_SHOP_API_URL=http://localhost:4000/shop-api 
NEXT_PUBLIC_VENDURE_LOCAL_URL=http://localhost:4000/shop-api 

ORDERCLOUD_CLIENT_ID=
ORDERCLOUD_CLIENT_SECRET=
STRIPE_SECRET=

KIBO_API_URL=
KIBO_CLIENT_ID=
KIBO_SHARED_SECRET=
KIBO_CART_COOKIE=
KIBO_CUSTOMER_COOKIE=
KIBO_API_HOST=

NEXT_PUBLIC_COMMERCEJS_PUBLIC_KEY=
NEXT_PUBLIC_COMMERCEJS_DEPLOYMENT_URL=

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:8

github_iconTop GitHub Comments

1reaction
philsmithiescommented, Feb 11, 2022
  • yarn turbo run build in the root folder and then cd site && yarn dev

worked for me thanks @tharakabimal

1reaction
GoodChemcommented, Feb 8, 2022

Try installing the dependencies using the following in the directory you installed yarn:

For commerce.js: yarn workspace @vercel/commerce run build

For local: yarn workspace @vercel/commerce-local run build

For anything else just switch out the @vercel/… for whatever package is missing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to load next.config.js - Stack Overflow
Solution: Modify the build script to use the correct path to Node.js, or update the Node.js version under the used path. 4. broken...
Read more >
next-config-error - Next.js
When attempting to load your next.config.js or next.config.mjs file, an error occurred. This could be due to a syntax error or attempting to...
Read more >
Failed to load next.config.js · Issue #274 - GitHub
After cloning the repository I created and set my .env.local file, ran npm i then ran npm run dev. The server starts, env...
Read more >
Error: Failed to load next.config.js - Square Developer
I'm getting a config error when running npm run dev coming from next.config.js and can't figure out what's causing it.…
Read more >
[Solved]-Failed to load next.config.js-Reactjs - appsloveworld
Solutions: · update Node.js to the supported version. · make sure you are using the correct environment, or use the correct path to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found