Next.js Discord

Discord Forum

unable to build the project

Unanswered
Large garden bumble bee posted this in #help-forum
Open in Discord
Large garden bumble beeOP
Hi im trying to build the project with npm run buildbut I receive this error.

npm run build

medusa-starter-default@0.0.1 build cross-env npm run clean && npm run build:server && npm run build:admin && next build medusa-starter-default@0.0.1 clean cross-env ./node_modules/.bin/rimraf dist medusa-starter-default@0.0.1 build:server cross-env npm run clean && tsc -p tsconfig.server.json medusa-starter-default@0.0.1 clean cross-env ./node_modules/.bin/rimraf dist medusa-starter-default@0.0.1 build:admin cross-env medusa-admin build ✔ Webpack Compiled successfully in 13.27s Build error occurred Error: > Couldn't find any pages or app directory. Please create one under the project root at findPagesDir (/home/username/ahsapsaksi.com/ahsapsaksi/node_modules/next/dist/lib/find-pages-dir.js:42:15) at /home/username/ahsapsaksi.com/ahsapsaksi/node_modules/next/dist/build/index.js:390:73 at async Span.traceAsyncFn (/home/username/ahsapsaksi.com/ahsapsaksi/node_modules/next/dist/trace/trace.js:154:20) at async build (/home/username/ahsapsaksi.com/ahsapsaksi/node_modules/next/dist/build/index.js:352:9)

im using default medusajs commerce repository and they dont haeve app or pages directory.

8 Replies

@joulev that doesnt look like a nextjs project
Large garden bumble beeOP
This is the source code
@Large garden bumble bee https://docs.medusajs.com/
Never used this so can’t guarantee you I’ll be able to answer, but your current project looks like it’s only the Medusa backend. Did you install the storefront as well? https://docs.medusajs.com/create-medusa-app
Large garden bumble beeOP
I installed, but i think i will locate storefront in separate folder
İm trying to deploy to vercel separately
Then I’m not sure here, you’ll need to look up build and deploy steps in the Medusa documentation
Large garden bumble beeOP
Hmm Thank you