N
Nuxt7mo ago
Patricius

Dockerized Nuxt3 Cannot find module "@vue/reactivity"

I am getting an error 500 on load. I checked my container files and the module exists under node_modules. This is my Dockerfile:
FROM oven/bun

WORKDIR /app

COPY package.json bun.lockb* ./

RUN bun install

COPY . .

RUN bun run build

EXPOSE 3000

CMD ["bun", "run", "dev"]
FROM oven/bun

WORKDIR /app

COPY package.json bun.lockb* ./

RUN bun install

COPY . .

RUN bun run build

EXPOSE 3000

CMD ["bun", "run", "dev"]
5 Replies
Patricius
PatriciusOP7mo ago
Is this an issue with how Bun resolves paths?
danielroe
danielroe7mo ago
What are you trying to do? Build + ship a Nuxt app and run with bun in production? Why do you run build if you're running a dev server?
Patricius
PatriciusOP7mo ago
This Dockerfile is meant for dev environment, it has bun run build for some reason but its only cause I had it generated by chatgpt. Yeah so I just want to create a dev environment using docker, and I use Nuxt3 with bun as my "frontend".
Patricius
PatriciusOP7mo ago
I get this error, I tried loading the module @vue/reactivity with my own JS code and it loads fine. I can see it inside of my node_modules in the container too.
No description
Patricius
PatriciusOP7mo ago
Ive made a Dockerfile for Production and it all works fine. Changing this Dockerfile to development with hot reload makes it throw this error :pepemeltdown: This is an error from Bun.
Want results from more Discord servers?
Add your server