Patricius
Patricius
Explore posts from servers
NNuxt
Created by Patricius on 8/8/2024 in #❓・help
Nuxt2 uses outdated TypeScript version
I am working to migrate a mono-repo. 1.) My root has a package.json and tsconfig that uses TypeScript 5.5.4 (latest version). 2.) I have a packages directory with directories that host small TS based packages. They all build with TS 5.5.4, types and only modules support (no CJS support). These packages are built using unbuild. 3.) I have a app directory, it has its own package.json and tsconfig, thats where my Nuxt2 app is located. 4.) On build and run my Nuxt2 app throws errors which I can only link to an outdated TypeScript version. <4.5 to be precise. This is the error:
ERROR ERROR in ../packages/core/src/useAction.ts:18:9 2:38:26 PM
TS2304: Cannot find name 'Awaited'.
16 | > = Fn extends (...args: any[]) => infer P
17 | ?
> 18 | | Awaited<P>
| ^^^^^^^
19 | | (Disabled extends true ? (Throw extends true ? never : null) : never)
20 | : never
ERROR ERROR in ../packages/core/src/useAction.ts:18:9 2:38:26 PM
TS2304: Cannot find name 'Awaited'.
16 | > = Fn extends (...args: any[]) => infer P
17 | ?
> 18 | | Awaited<P>
| ^^^^^^^
19 | | (Disabled extends true ? (Throw extends true ? never : null) : never)
20 | : never
What I already tried - Forcing 5.5.4 TS version in app directory through resolutions. This produces countless of other errors and does not fix this either.
1 replies
NNuxt
Created by Patricius on 6/13/2024 in #❓・help
Dockerized Nuxt3 with Bun Cannot find module "@vue/reactivity"
No description
18 replies
CC#
Created by Patricius on 6/13/2024 in #help
Dockerized .NET8 API not accessible.
When I try curl I get "(56) Recv Failure. Connection refused by peer." Docker compose
version: '2.27'
services:
api:
build:
context: ./server
dockerfile: Dockerfile
container_name: "dotnet_api"
restart: always
labels:
- "author=${AUTHOR}"
- "project=${SLUG}"
ports:
- "8080:8080"
environment:
ConnectionStrings__DefaultConnection: "server=db;userid=${MYSQL_USER};password=${MYSQL_PASSWORD};database=${MYSQL_DATABASE};"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
version: '2.27'
services:
api:
build:
context: ./server
dockerfile: Dockerfile
container_name: "dotnet_api"
restart: always
labels:
- "author=${AUTHOR}"
- "project=${SLUG}"
ports:
- "8080:8080"
environment:
ConnectionStrings__DefaultConnection: "server=db;userid=${MYSQL_USER};password=${MYSQL_PASSWORD};database=${MYSQL_DATABASE};"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
Dockerfile
ARG DOTNET_IMAGE=mcr.microsoft.com/dotnet/sdk:8.0
FROM $DOTNET_IMAGE AS base
WORKDIR /usr/src/app

FROM base AS dependencies
COPY *.csproj ./
RUN dotnet restore

FROM base AS development
COPY --from=dependencies /usr/src/app/*.csproj ./
COPY . .
RUN dotnet build -c Debug -o out
EXPOSE 8080

ENTRYPOINT ["dotnet", "watch", "run", "--project", "server.csproj"]
ARG DOTNET_IMAGE=mcr.microsoft.com/dotnet/sdk:8.0
FROM $DOTNET_IMAGE AS base
WORKDIR /usr/src/app

FROM base AS dependencies
COPY *.csproj ./
RUN dotnet restore

FROM base AS development
COPY --from=dependencies /usr/src/app/*.csproj ./
COPY . .
RUN dotnet build -c Debug -o out
EXPOSE 8080

ENTRYPOINT ["dotnet", "watch", "run", "--project", "server.csproj"]
What I already tried: - Running it outside Docker, it works. - Running curl commands inside Docker, they work. - Made sure that my app listens to port 8080. - Changing port from 5282 to 8080. Port 5282 now gets failure 7, 8080 now gets error 56 similarly to what 5282 was getting. "Recv failure. Connection refused by peer." - Researched online, from what I understand this issue is .NET8 specific and has to do with "Kestrel" not allowing traffic from outside of local device. I am just using the weatherforecast template, so I have not written any code yet. I am on MacOS Sonoma 14.5 if that helps.
28 replies
NNuxt
Created by Patricius on 6/12/2024 in #❓・help
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"]
9 replies