Giter Club home page Giter Club logo

Comments (3)

nabilnazar avatar nabilnazar commented on July 20, 2024

can someone provide a solution I'm getting this error when trying to use the command npm run start

from kerala-dashboard.

gillmoni avatar gillmoni commented on July 20, 2024

can someone provide a solution I'm getting this error when trying to use the command npm run start
I was getting an error like you.

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run start

[email protected] start C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
Error: Could not find a production build in the 'C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard.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 (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\next-server\server\next-server.js:150:355)
at new Server (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\next-server\server\next-server.js:3:120)
at NextServer.createServer (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\server\next.js:1:2935)
at async C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\server\next.js:1:3360
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: next start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Test\AppData\Roaming\npm-cache_logs\2021-05-08T04_43_00_790Z-debug.log
`

Solution
try

  1. npm run build then
  2. npm run start

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run build

[email protected] build C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next build

info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

info - Checking validity of types
info - Using external babel configuration from C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard.babelrc
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (3/3)
info - Finalizing page optimization

Page Size First Load JS
┌ ● / 546 kB 646 kB
├ /_app 0 B 99.1 kB
├ ○ /404 3.16 kB 102 kB
└ ● /hotspots 246 kB 345 kB
└ css/721998bca3295dd40ea0.css 4.41 kB

  • First Load JS shared by all 99.1 kB
    ├ chunks/173.baa236.js 3.65 kB
    ├ chunks/282.bd22fd.js 13.4 kB
    ├ chunks/778.68bcf7.js 6.83 kB
    ├ chunks/983.2e6c84.js 20.5 kB
    ├ chunks/framework.9b63ec.js 42.4 kB
    ├ chunks/main.60aaf1.js 152 B
    ├ chunks/pages/_app.ea75c7.js 11.2 kB
    ├ chunks/webpack.9fa533.js 1.04 kB
    └ css/2664f61f2c599c9c5a59.css 7 kB

λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
(ISR) incremental static regeneration (uses revalidate in getStaticProps)
`

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run start

[email protected] start C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
`

from kerala-dashboard.

nabilnazar avatar nabilnazar commented on July 20, 2024

can someone provide a solution I'm getting this error when trying to use the command npm run start
I was getting an error like you.

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run start

[email protected] start C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
Error: Could not find a production build in the 'C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard.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 (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\next-server\server\next-server.js:150:355)
at new Server (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\next-server\server\next-server.js:3:120)
at NextServer.createServer (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\server\next.js:1:2935)
at async C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\server\next.js:1:3360
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: next start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Test\AppData\Roaming\npm-cache_logs\2021-05-08T04_43_00_790Z-debug.log
`

Solution
try

  1. npm run build then
  2. npm run start

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run build

[email protected] build C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next build

info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

info - Checking validity of types
info - Using external babel configuration from C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard.babelrc
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (3/3)
info - Finalizing page optimization

Page Size First Load JS
┌ ● / 546 kB 646 kB
├ /_app 0 B 99.1 kB
├ ○ /404 3.16 kB 102 kB
└ ● /hotspots 246 kB 345 kB
└ css/721998bca3295dd40ea0.css 4.41 kB

  • First Load JS shared by all 99.1 kB
    ├ chunks/173.baa236.js 3.65 kB
    ├ chunks/282.bd22fd.js 13.4 kB
    ├ chunks/778.68bcf7.js 6.83 kB
    ├ chunks/983.2e6c84.js 20.5 kB
    ├ chunks/framework.9b63ec.js 42.4 kB
    ├ chunks/main.60aaf1.js 152 B
    ├ chunks/pages/_app.ea75c7.js 11.2 kB
    ├ chunks/webpack.9fa533.js 1.04 kB
    └ css/2664f61f2c599c9c5a59.css 7 kB

λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
(ISR) incremental static regeneration (uses revalidate in getStaticProps)
`

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run start

[email protected] start C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
`

can someone provide a solution I'm getting this error when trying to use the command npm run start
I was getting an error like you.

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run start

[email protected] start C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
Error: Could not find a production build in the 'C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard.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 (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\next-server\server\next-server.js:150:355)
at new Server (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\next-server\server\next-server.js:3:120)
at NextServer.createServer (C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\server\next.js:1:2935)
at async C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard\node_modules\next\dist\server\next.js:1:3360
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: next start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Test\AppData\Roaming\npm-cache_logs\2021-05-08T04_43_00_790Z-debug.log
`

Solution
try

  1. npm run build then
  2. npm run start

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run build

[email protected] build C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next build

info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

info - Checking validity of types
info - Using external babel configuration from C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard.babelrc
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
info - Generating static pages (3/3)
info - Finalizing page optimization

Page Size First Load JS
┌ ● / 546 kB 646 kB
├ /_app 0 B 99.1 kB
├ ○ /404 3.16 kB 102 kB
└ ● /hotspots 246 kB 345 kB
└ css/721998bca3295dd40ea0.css 4.41 kB

  • First Load JS shared by all 99.1 kB
    ├ chunks/173.baa236.js 3.65 kB
    ├ chunks/282.bd22fd.js 13.4 kB
    ├ chunks/778.68bcf7.js 6.83 kB
    ├ chunks/983.2e6c84.js 20.5 kB
    ├ chunks/framework.9b63ec.js 42.4 kB
    ├ chunks/main.60aaf1.js 152 B
    ├ chunks/pages/_app.ea75c7.js 11.2 kB
    ├ chunks/webpack.9fa533.js 1.04 kB
    └ css/2664f61f2c599c9c5a59.css 7 kB

λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
(ISR) incremental static regeneration (uses revalidate in getStaticProps)
`

`C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard>npm run start

[email protected] start C:\Users\Test\Desktop\sgnr-dashboard\kerala-dashboard
next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Using webpack 5. Reason: no custom webpack configuration in next.config.js https://nextjs.org/docs/messages/webpack5
`

This solution solved the issue. Thank you so much @gillmoni for your quick response

from kerala-dashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.