jklJ
Deno14mo ago
jkl

deno task build vue application failure

Hello

I am trying to setup a vue 3 application with vite using deno (mostly using the proper tutorial from the deno page itself). However, when I run deno task build, I get the following error:

❯ deno task build
Task build vue-tsc -b && vite build
src/main.ts:3:17 - error TS2307: Cannot find module './App.vue' or its corresponding type declarations.

My package.json is the following:

{
"name": "deno-test",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.5.12"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.4",
"typescript": "~5.6.2",
"vite": "^5.4.10",
"vue-tsc": "^2.1.8"
}
}

All of this is being run in a Dockerfile

Stage 1: Initial setup

FROM denoland/deno:2.0.6 AS base
WORKDIR /usr/src/app

Stage 2: Install dependencies into temp directory this will cache them and speed up future builds

FROM base AS install
RUN mkdir -p /temp/install
COPY package.json deno.lock /temp/install/
RUN cd /temp/install && deno install --frozen

Stage 3: Copy node_modules from temp directory then copy all (non-ignored) project files into the image

FROM base AS prerelease
COPY --from=install /temp/install/node_modules node_modules
COPY . .

RUN deno task build

Stage 4: Copy production code image

FROM nginx:alpine AS release
COPY --from=prerelease /usr/src/app/dist/ ./usr/share/nginx/html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]

Any ideas why this is broken?
Was this page helpful?