Hi I git clone the master branch and do yarn to install node modules.
When I do yarn dev I have the following error:
The console output:
index.js:247 Uncaught at getNodeRequestOptions (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/node_modules/next/dist/compiled/node-fetch/index.js:1:145647)
at <unknown> (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/node_modules/next/dist/compiled/node-fetch/index.js:1:147021)
at new Promise (<anonymous>)
at fetch (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/node_modules/next/dist/compiled/node-fetch/index.js:1:146956)
at Function.module.exports../pages/_app.js.MyApp.getInitialProps (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/.next/server/pages/_app.js:2929:78)
at loadGetInitialProps (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/node_modules/next/dist/next-server/lib/utils.js:5:101)
at renderToHTML (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/node_modules/next/dist/next-server/server/render.js:22:1221)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/node_modules/next/dist/next-server/server/next-server.js:76:329)
at async (file:///home/tingkai/nextjs_app/Making-Websites-With-Next.js-And-Strapi/node_modules/next/dist/next-server/server/next-server.js:75:142)
Do you have any thoughts on what could be wrong?
Thanks!
Did you try hard coding the URL to your API instead of using PublicRuntimeConfig etc. Because your API_URL should be in .env file, and that file is not in the git repo. You need to create it yourself.
Hi I
git clone
the master branch and doyarn
to install node modules. When I doyarn dev
I have the following error:The console output:
Do you have any thoughts on what could be wrong? Thanks!
Other info