Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not find a production build in the '/Users/dmitriymalayev/Desktop/portfolio_website-STARTER/.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id #19

Open
DmitriyMalayev opened this issue Dec 30, 2021 · 4 comments

Comments

@DmitriyMalayev
Copy link

dmitriymalayev@Dmitriys-Mini portfolio_website-STARTER % npm i
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

added 306 packages, and audited 307 packages in 5s

45 packages are looking for funding
run npm fund for details

2 vulnerabilities (1 moderate, 1 high)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.
dmitriymalayev@Dmitriys-Mini portfolio_website-STARTER % npm start

[email protected] start
next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no next.config.js https://nextjs.org/docs/messages/webpack5
Error: Could not find a production build in the '/Users/dmitriymalayev/Desktop/portfolio_website-STARTER/.next' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id
at Server.readBuildId (/Users/dmitriymalayev/Desktop/portfolio_website-STARTER/node_modules/next/dist/next-server/server/next-server.js:151:355)
at new Server (/Users/dmitriymalayev/Desktop/portfolio_website-STARTER/node_modules/next/dist/next-server/server/next-server.js:3:120)
at NextServer.createServer (/Users/dmitriymalayev/Desktop/portfolio_website-STARTER/node_modules/next/dist/server/next.js:1:2935)
at async /Users/dmitriymalayev/Desktop/portfolio_website-STARTER/node_modules/next/dist/server/next.js:1:3360
dmitriymalayev@Dmitriys-Mini portfolio_website-STARTER %

@ryanttang
Copy link

@DmitriyMalayev I had a similar problem and was able to get it to work by using version 16.13.0 of Node

nvm install 16.13.0

@DmitriyMalayev
Copy link
Author

DmitriyMalayev commented Dec 31, 2021 via email

@Omkarkale59
Copy link

i resolve this issue
simple u can just do it this simple steps

  1. npm update latest
  2. deleting the module and .next file
  3. yarn
  4. yarn dev

thnks for reading this
i take 2 days to understand this issue this is hectik for me to resolve this

@BogdaLD
Copy link

BogdaLD commented Apr 16, 2024

the same issue to me. and can't solove by update the node version.need help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants