Closed GSdaBlessedFist closed 4 months ago
I am facing similar issue. I have node version 21.6.2 installed on windows. Installed medusa backend admin + frontend with cli command. While admin is running fine in browser, but launching storefront is giving the build error.
⨯ ./node_modules/@vespaiach/axios-fetch-adapter/index.js:2:0
Module not found: Package path ./lib/core/settle is not exported from package D:\nextjs\medusa-ecom\medusa-store-storefront\node_modules\axios (see exports field in D:\nextjs\medusa-ecom\medusa-store-storefront\node_modules\axios\package.json)
https://nextjs.org/docs/messages/module-not-found
Tried deleting node_modules folder and reinstalled modules with pnpm install
and pnpm run dev
give same error.
Also tried with npm install
and npm run dev
, still same error.
Even creating fresh storefront with https://docs.medusajs.com/starters/nextjs-medusa-starter#option-2-install-nextjs-storefront-only also causing same error.
Due to this unable to open storefront in browser.
Please suggest, its important to run ecommerce frontend.
I ran in to the same issue, seems like there are dependencies that require yarn to install.
Here's how I fixed it
npm install -g yarn
yarn install
in the storefront directoryThen npm run dev
should work. There still seems to be issue related to building though.
ooh, nice catch. You're saying to use yarn to install the @vespaiach/axios-fetch-adapter specifically?
I'd buy you a beer. 🍺
After some debugging and trying with different ways, I found the issue is related to @vespaiach/axios-fetch-adapter module which requires axios version 0.27.2, but by default the axios installed version is 1.6.7 with storefront. So, its the axios dependency problem.
I solved with running following steps:
pnpm uninstall axios
pnpm uninstall @vespaiach/axios-fetch-adapter
pnpm install axios@0.27.2
pnpm install @vespaiach/axios-fetch-adapter
pnpm run dev
Same you can perform with npm if you are not using pnpm.
And then the storefront worked.
Hey, thanks for the report! Since v2 brought a lot of architectural and API changes on the backend, we will be closing this ticket since it no longer applies to our new setup, or the issue has already been fixed. If you are still facing issues with v1, please open a new ticket and we will address it as soon as possible. Thanks! 🙏
Bug report
Describe the bug
While attempting to complete the initial onboarding process, the sections :"Preview Product in your Next.js Storefront" and "Create an Order using your Next.js Storefront", are resulting in error messages in the browser.
System information
Medusa version: @latest Node.js version: 20.0 from package.json::
Database: default fake Redis instance Operating system: Kubuntu 20 Browser (if relevant): Chrome Version 121.0.6167.160 (Official Build) (64-bit)
Steps to reproduce the behavior
rm -rf "$(npm config get cache)/_npx"
npx create-medusa-app@latest --with-nextjs-starter
The issue starts here.
Section Preview Product in your Next.js Storefront:
Expected behavior
It is expected that the button redirects to "http://localhost:8000/products/medusa-t-shirt/onboarding=true"
Screenshots
When attempting to open the Next storefront on it's own using
npm run dev
, I receive this error message in the browser:Settings > Regions:
I'm not sure if these are the same issue but they are both happening when reattempting install
Additional context
It does seem the "@vespaiach/axios-fetch-adapter" is installed.