Questions tagged next.js

Explore the latest questions and answers asked by our top developers.

Next JS App Dockerfile build locally but fails in Cloud Run when CI/CD

While trying to implement CI/CD in Cloud Run using a Dockerfile, it fails as if some fail were not found. I have built the same container locally with no issues. Here is my Dockerfile: NextJS version: 12.0.1 Docker: 4.4.2 # Install dependencies only when needed FROM node:16-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why […]

By Marco
Published
Categorised as docker, gcloud, google-cloud-run, next.js, webpack Tagged , , , ,

How to install @swc/core-linux-musl on windows, to make it work in docker container?

I’am working on windows. I docernize Next.js with Typescript app. Here is my dockerfile: FROM node:alpine # create directory where our application will be run RUN mkdir -p /usr/src WORKDIR /usr/src # copy our files into directory COPY . /usr/src # install dependences RUN npm install EXPOSE 3000 ENTRYPOINT ["npm", "run" ,"dev"] During development I […]

By Sonny D
Published
Categorised as docker, next.js Tagged ,

DynamicZone not Accessible on Strap API

i wanted to give Strapi Headless CMS a try, and for that purpose i found this docker setup here: https://github.com/Elvincth/turbo-strapi-nextjs I followed the instructions of the repo and it worked pretty good. It uses version 4.0.2. I created some test data structures as you can see here: There is one problem. I would expect, after […]

By SupaMario
Published
Categorised as docker, headless, headless-cms, next.js, strapi Tagged , , , ,

Using Laravel Breeze with NextJS in Docker

I’m trying to run laravel breeze with NextJS in docker with the starter from this repo https://github.com/aschmelyun/docker-compose-laravel. The problem is that I can’t figure out how to get Nextjs to even run. I’ve tried modifying the docker-compose.yml file as follows: version: ‘3.9’ networks: laravel: null services: site: build: context: ./dockerfiles dockerfile: nginx.dockerfile args: – UID=${UID:-1000} […]

By on3ss
Published
Categorised as docker, docker-compose, laravel, next.js Tagged , , ,

Docker secret nextjs env variables are not available at runtime

I am trying to set environment variables in my dockerfile that are available at runtime after running the next js app via npm run start (next start). I have read that I need to use ENV variables in my dockerfile to have these env variables available at runtime. ARG variables in dockerfile are only available […]

Dockerize NextJS Application with Prisma

I have created a NextJS application, to connect to the database I use Prisma. When I start the application on my computer everything works. Unfortunately, I get error messages when I try to run the application in a Docker container. The container can be created and started. The start page of the application can also […]

By Louis Christ
Published
Categorised as docker, next.js, prisma Tagged , ,

NextAuth – getToken returns null on production, but returns token in dev environment

I have a simple app where I use NextAuth for authentication. I use the spotify provider and everything works fine in my dev environment. However, it does not when I run my app in docker on my server. This is my _app.jsx: import "../styles/globals.css" import { SessionProvider } from "next-auth/react" import { RecoilRoot } from […]

By Luuk Wuijster
Published
Categorised as docker, next-auth, next.js, reactjs Tagged , , ,

UI looks different from the deployed website

I’m a beginner front-end developer. I recently cloned a github repo for an opensource (sorry can’t provide link) and ran it using docker. When I load the UI on localhost only some of the features on the deployed website showed up, but when I used developer tools on chrome there’s no error and nothing in […]

Dockerizing Nextjs

I need to publish my Next js project on a server. For that, by request of admin, I need to dockerize it (because SWC compiler is not available on the server). I set up Docker Desktop, created Dockerfile (content below) and docker-compose.yml (content below) Then I successfully ran "docker-compose build" and then "docker-compose up" – […]

By Dmitry Kotikov
Published
Categorised as docker, next.js Tagged ,

Problem with the Unmarshal error in the api (listmonk)

my code- var email; var setEmail; export default function Home() { // NEW CODE — Udhay’s [email, setEmail] = useState(”) const handleEmailChange = event => { setEmail(event.target.value) }; const handleSubmit = Postdata(); // const handleSubmit = event => { // alert(`Your state values: n // email:${email} n`); // console.log(`${email}`); // }; async function Postdata(){ try […]

By udhay r
Published
Categorised as api, docker, next.js, node-fetch Tagged , , ,
1 2 3 14

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq