strapi / strapi-starter-next-corporate

Next.js starter for creating a corporate site with Strapi.
https://strapi-starter-next-corporate.vercel.app
MIT License
346 stars 95 forks source link

unable to deploy on local - Frontend #42

Open grssl opened 3 years ago

grssl commented 3 years ago

I followed the instructions and deployed this template; I see strapi coming up effortlessly (on mongodb). However the front end doesn't render and gives error.

/Users/shivaprasadkadoor/programs2102-2/clayart>yarn develop yarn run v1.22.5 $ cross-env FORCE_COLOR=1 npm-run-all -l -p develop:* $ wait-on http://localhost:1337/admin && yarn --cwd frontend develop $ yarn --cwd backend develop $ strapi develop [develop:backend ] [develop:backend ] Project information [develop:backend ] [develop:backend ] ┌────────────────────┬──────────────────────────────────────────────────┐ [develop:backend ] │ Time │ Sun Jun 20 2021 12:23:25 GMT+0530 (India Standa… │ [develop:backend ] │ Launched in │ 5041 ms │ [develop:backend ] │ Environment │ development │ [develop:backend ] │ Process PID │ 68430 │ [develop:backend ] │ Version │ 3.6.3 (node v14.16.1) │ [develop:backend ] │ Edition │ Community │ [develop:backend ] └────────────────────┴──────────────────────────────────────────────────┘ [develop:backend ] [develop:backend ] Actions available [develop:backend ] [develop:backend ] Welcome back! [develop:backend ] To manage your project 🚀, go to the administration panel at: [develop:backend ] http://localhost:1337/admin [develop:backend ] [develop:backend ] To access the server ⚡️, go to: [develop:backend ] http://localhost:1337 [develop:backend ] [develop:backend ] [2021-06-20T06:53:26.067Z] debug HEAD /admin (13 ms) 200 warning package.json: No license field $ next [develop:frontend] ready - started server on 0.0.0.0:3000, url: http://localhost:3000 [develop:frontend] info - Loaded env from /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/.env.local [develop:frontend] info - Using webpack 4. Reason: future.webpack5 option not enabled https://nextjs.org/docs/messages/webpack5 [develop:frontend] event - compiled successfully [develop:frontend] event - build page: /next/dist/pages/_error [develop:frontend] wait - compiling... [develop:frontend] event - compiled successfully [develop:backend ] [2021-06-20T06:53:45.582Z] debug GET /global?_locale=en (19 ms) 404 [develop:frontend] Not Found [develop:frontend] Error: An error occured please try again [develop:frontend] at fetchAPI (webpack-internal:///./utils/api.js:30:11) [develop:frontend] at runMicrotasks () [develop:frontend] at processTicksAndRejections (internal/process/task_queues.js:93:5) [develop:frontend] at async getGlobalData (webpack-internal:///./utils/api.js:57:18) [develop:frontend] at async Function.MyApp.getInitialProps (webpack-internal:///./pages/_app.js:109:24) [develop:frontend] at async loadGetInitialProps (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/lib/utils.js:5:91) [develop:frontend] at async renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/render.js:28:1494) [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:112:97 [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:105:142 [develop:frontend] at async DevServer.renderToHTMLWithComponents (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:137:387) [develop:frontend] at async DevServer.renderErrorToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:139:505) [develop:frontend] at async DevServer.renderErrorToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:1380) [develop:frontend] at async DevServer.renderError (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:138:1659) [develop:frontend] event - build page: /[[...slug]] [develop:frontend] wait - compiling... [develop:frontend] event - compiled successfully [develop:backend ] [2021-06-20T06:53:50.415Z] debug GET /pages?_locale=en (15 ms) 200 [develop:backend ] [2021-06-20T06:53:50.416Z] debug GET /pages?_locale=fr (11 ms) 200 [develop:backend ] [2021-06-20T06:53:50.436Z] debug GET /global?_locale=en (9 ms) 404 [develop:frontend] Not Found [develop:frontend] Error: An error occured please try again [develop:frontend] at fetchAPI (webpack-internal:///./utils/api.js:30:11) [develop:frontend] at runMicrotasks () [develop:frontend] at processTicksAndRejections (internal/process/task_queues.js:93:5) [develop:frontend] at async getGlobalData (webpack-internal:///./utils/api.js:57:18) [develop:frontend] at async Function.MyApp.getInitialProps (webpack-internal:///./pages/_app.js:109:24) [develop:frontend] at async loadGetInitialProps (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/lib/utils.js:5:91) [develop:frontend] at async renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/render.js:28:1494) [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:112:97 [develop:frontend] at async wrapper (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/lib/coalesced-function.js:1:330) [develop:frontend] at async DevServer.renderToHTMLWithComponents (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:137:114) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:138:923) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:578) [develop:frontend] at async DevServer.render (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:75:236) [develop:frontend] at async Object.fn (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:59:580) [develop:frontend] at async Router.execute (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/router.js:25:67) [develop:frontend] at async DevServer.run (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:69:1042) [develop:backend ] [2021-06-20T06:53:50.454Z] debug GET /global?_locale=en (7 ms) 404 [develop:frontend] Not Found [develop:frontend] Error: An error occured please try again [develop:frontend] at fetchAPI (webpack-internal:///./utils/api.js:30:11) [develop:frontend] at runMicrotasks () [develop:frontend] at processTicksAndRejections (internal/process/task_queues.js:93:5) [develop:frontend] at async getGlobalData (webpack-internal:///./utils/api.js:57:18) [develop:frontend] at async Function.MyApp.getInitialProps (webpack-internal:///./pages/_app.js:109:24) [develop:frontend] at async loadGetInitialProps (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/lib/utils.js:5:91) [develop:frontend] at async renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/render.js:28:1494) [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:112:97 [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:105:142 [develop:frontend] at async DevServer.renderToHTMLWithComponents (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:137:387) [develop:frontend] at async DevServer.renderErrorToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:139:505) [develop:frontend] at async DevServer.renderErrorToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:1380) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:138:1281) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:578) [develop:frontend] at async DevServer.render (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:75:236) [develop:frontend] at async Object.fn (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:59:580) [develop:frontend] TypeError: Cannot set property 'pageProps' of undefined [develop:frontend] at renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/render.js:48:31) [develop:frontend] at runMicrotasks () [develop:frontend] at processTicksAndRejections (internal/process/task_queues.js:93:5) [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:112:97 [develop:frontend] at async __wrapper (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/lib/coalesced-function.js:1:330) [develop:frontend] at async DevServer.renderToHTMLWithComponents (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:137:114) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:138:923) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:578) [develop:frontend] at async DevServer.render (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:75:236) [develop:frontend] at async Object.fn (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:59:580) [develop:frontend] at async Router.execute (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/router.js:25:67) [develop:frontend] at async DevServer.run (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:69:1042) [develop:frontend] at async DevServer.handleRequest (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:34:504) [develop:backend ] [2021-06-20T06:53:57.911Z] debug GET /pages?_locale=en (29 ms) 200 [develop:backend ] [2021-06-20T06:53:57.912Z] debug GET /pages?_locale=fr (20 ms) 200 [develop:backend ] [2021-06-20T06:53:57.941Z] debug GET /global?_locale=en (13 ms) 404 [develop:frontend] Not Found [develop:frontend] Error: An error occured please try again [develop:frontend] at fetchAPI (webpack-internal:///./utils/api.js:30:11) [develop:frontend] at processTicksAndRejections (internal/process/task_queues.js:93:5) [develop:frontend] at async getGlobalData (webpack-internal:///./utils/api.js:57:18) [develop:frontend] at async Function.MyApp.getInitialProps (webpack-internal:///./pages/_app.js:109:24) [develop:frontend] at async loadGetInitialProps (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/lib/utils.js:5:91) [develop:frontend] at async renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/render.js:28:1494) [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:112:97 [develop:frontend] at async wrapper (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/lib/coalesced-function.js:1:330) [develop:frontend] at async DevServer.renderToHTMLWithComponents (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:137:114) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:138:923) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:578) [develop:frontend] at async DevServer.render (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:75:236) [develop:frontend] at async Object.fn (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:59:580) [develop:frontend] at async Router.execute (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/router.js:25:67) [develop:frontend] at async DevServer.run (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:69:1042) [develop:frontend] at async DevServer.handleRequest (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:34:504) [develop:backend ] [2021-06-20T06:53:58.003Z] debug GET /global?_locale=en (47 ms) 404 [develop:frontend] Not Found [develop:frontend] Error: An error occured please try again [develop:frontend] at fetchAPI (webpack-internal:///./utils/api.js:30:11) [develop:frontend] at processTicksAndRejections (internal/process/task_queues.js:93:5) [develop:frontend] at async getGlobalData (webpack-internal:///./utils/api.js:57:18) [develop:frontend] at async Function.MyApp.getInitialProps (webpack-internal:///./pages/_app.js:109:24) [develop:frontend] at async loadGetInitialProps (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/lib/utils.js:5:91) [develop:frontend] at async renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/render.js:28:1494) [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:112:97 [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:105:142 [develop:frontend] at async DevServer.renderToHTMLWithComponents (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:137:387) [develop:frontend] at async DevServer.renderErrorToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:139:505) [develop:frontend] at async DevServer.renderErrorToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:1380) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:138:1281) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:578) [develop:frontend] at async DevServer.render (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:75:236) [develop:frontend] at async Object.fn (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:59:580) [develop:frontend] at async Router.execute (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/router.js:25:67) [develop:frontend] TypeError: Cannot set property 'pageProps' of undefined [develop:frontend] at renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/render.js:48:31) [develop:frontend] at processTicksAndRejections (internal/process/task_queues.js:93:5) [develop:frontend] at async /Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:112:97 [develop:frontend] at async __wrapper (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/lib/coalesced-function.js:1:330) [develop:frontend] at async DevServer.renderToHTMLWithComponents (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:137:114) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:138:923) [develop:frontend] at async DevServer.renderToHTML (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/server/next-dev-server.js:35:578) [develop:frontend] at async DevServer.render (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:75:236) [develop:frontend] at async Object.fn (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:59:580) [develop:frontend] at async Router.execute (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/router.js:25:67) [develop:frontend] at async DevServer.run (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:69:1042) [develop:frontend] at async DevServer.handleRequest (/Users/shivaprasadkadoor/programs2102-2/clayart/frontend/node_modules/next/dist/next-server/server/next-server.js:34:504) [develop:backend ] [2021-06-20T06:54:02.728Z] debug GET /pages?_locale=en (11 ms) 200 [develop:backend ] [2021-06-20T06:54:02.729Z] debug GET /pages?_locale=fr (20 ms) 200 [develop:backend ] [2021-06-20T06:54:02.752Z] debug GET /global?_locale=en (13 ms) 404 [develop:fronte

My setup: OS: Mac OS Big Sur V11.1 Node: v14.16.1 npm: 6.14.12

Screenshot 2021-06-20 at 12 29 35 PM

Please let me know how to overcome this issue.

codeSoulRat commented 3 years ago

@grssl I have just encountered the same issue when run it locally on windows10, did you find a solution?

callum-gander commented 2 years ago

Also encountering this error. Any solutions?