Category : next.js

I am trying to create a docker image but I am getting this error(Couldn’t find a pages directory. Please create one under the project root) in the "npm run build" step. But I have that directory in my application root folder. In my local server it is running fine and creating .next folder. My folder ..

Read more

I have a Kubernetes cluster on Digitalocean where www.example.com points to my Next.js application. This works as expected, however it serves all the assets from that same pod where my Next.js is running: https://www.example.com/_next/static/chunks/webpack-16e102404d6e7c36f3ae.js https://www.example.com/_next/static/chunks/framework-852c1b21255b4351ab3d.js and so on. Now I would like to serve these static files from a CDN instead, so I started researching ..

Read more

I’m trying to send a simple GET request from my Next.js getStaticProps function to another container which is a node backend api using docker-compose. This is my docker-compose file: version: "3" services: web: build: ./backend volumes: – ./backend:/home/node/app/ ports: – "3001:3001" frontend: build: ./frontend volumes: – ./frontend:/home/node/app/ ports: – "3000:3000" depends_on: – "web" Index.js in ..

Read more

Looking to get NextJS working with a separate express backend on Elastic Beanstalk. I’ve got everything dockerized with an NGINX reverse proxy. Locally, everything works when using getServerSideProps, but the same request returns a 500 when deployed. Client side requests work as expected. I’ve tried various updates to the config, different urls, and could only ..

Read more

In react (Nextjs) application, I am trying to implement PTI feature by referring https://starcard-org.github.io/pti-docs/guide/v0/#/?id=pti-clients-signature. As per this documentation, If I try to run docker login docker.pkg.github.com it will ask username and password which I don’t know where will I get the login details for it. I go through some documents but didn’t help me out. ..

Read more

I have a Next.js application that I want to run using Docker compose My docker.compose.yml: version: "3.6" services: … next: container_name: next build: context: ./frontend/next dockerfile: Dockerfile.development restart: always ports: – 3000:3000 volumes: – ./frontend/next:/frontend-app – ./frontend/next/package.json:/frontend-app/package.json – ./frontend/next/yarn.lock:/frontend-app/yarn.lock and my ./frontend/next/Dockerfile.development is: FROM mhart/alpine-node RUN mkdir /frontend-app WORKDIR /frontend-app COPY package.json yarn.lock ./ RUN ..

Read more