Hey there I'm breaking my back to understand why this is happening, I migrated my Vuejs project to Nuxt and started on SEO found out the nuxt-seo and start to implement, it first I was receiving this error:
[nuxt-og-image] WARN ReSVG is missing dependencies for environment. Falling back to WASM version, this may slow down PNG rendering.
ERROR Cannot start nuxt: Invalid SVG
at Object.calculate (node_modules/image-size/dist/types/svg.js:88:15)
at lookup (node_modules/image-size/dist/index.js:34:53)
at imageSize (node_modules/image-size/dist/index.js:98:16)
at getImageDimensions (node_modules/nuxt-seo-experiments/dist/module.mjs:52:10)
at async getImageMeta (node_modules/nuxt-seo-experiments/dist/module.mjs:27:29)
at async node_modules/nuxt-seo-experiments/dist/module.mjs:86:24
at async Promise.all (index 3)
at async generateTagsFromPublicFiles (node_modules/nuxt-seo-experiments/dist/module.mjs:84:10)
at async setup (node_modules/nuxt-seo-experiments/dist/module.mjs:416:7)
at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:2126:17)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2468:95)
at async setup (node_modules/@nuxtjs/seo/dist/module.mjs:46:7)
at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:2126:17)
at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2468:95)
at async initNuxt (node_modules/nuxt/dist/index.mjs:4496:5)
at async NuxtDevServer._load (node_modules/nuxi/dist/chunks/dev2.mjs:6875:5)
at async NuxtDevServer.load (node_modules/nuxi/dist/chunks/dev2.mjs:6810:7)
at async NuxtDevServer.init (node_modules/nuxi/dist/chunks/dev2.mjs:6805:5)
at async Object.run (node_modules/nuxi/dist/chunks/dev-child.mjs:98:5)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1648:16)
at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1639:11)
at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1777:7)
To troubleshoot, I separately installed nuxt-ogImage, which worked well. I also tried installing @resvg/resvg-js, which resolved the initial warning but introduced new issues.
More details:
Dockerfile:
FROM node:lts-alpine
# Set working directory
WORKDIR /vue
# Copy only package files first for efficient caching
COPY package*.json ./
# Install dependencies
RUN apk add --no-cache --update \
g++ \
make \
autoconf \
automake \
libtool \
nasm \
pkgconf \
rust \
cargo
# Install Resvg
RUN npm install @resvg/resvg-js
RUN cargo install wasm-pack
# Install dependencies (including devDependencies for Vite)
RUN npm install
RUN npm audit fix
# Copy the rest of the source code
COPY . .
# Expose the port your app will run on (default for Vite)
EXPOSE 5173
# Define the default command to run your app (adjust if needed)
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173", "--no-open"]
# CMD ["tail", "-f", "/dev/null"]
Describe the bug
Hey there I'm breaking my back to understand why this is happening, I migrated my Vuejs project to Nuxt and started on SEO found out the nuxt-seo and start to implement, it first I was receiving this error:
To troubleshoot, I separately installed nuxt-ogImage, which worked well. I also tried installing @resvg/resvg-js, which resolved the initial warning but introduced new issues.
More details:
Dockerfile:
nuxt.config.ts
package.json:
Thank you for your reply!
Reproduction
No response
System / Nuxt Info
No response