next-image-trace-loader icon indicating copy to clipboard operation
next-image-trace-loader copied to clipboard

Type error

Open RenatoCesarF opened this issue 2 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

I tried use to default package image-trace-load, but I wasn't able to use it in next. Then I found yours, but I'm getting a very strange bug

Even using your image, and your Tag declaration my page gives me this error:

./public/star-1.png
TypeError: unsupported file type: undefined (file: undefined)

I'm using Typescript with next js

here is my next.config:

/** @type {import('next').NextConfig} */
const withPWA = require("next-pwa");

const tracedImages = {
  test: /\.(png|jpe?g|gif|jp2|webp)$/,
  use: [
    {
      loader: 'image-trace-loader'
    }
  ]
};

module.exports = withPWA({
  pwa: {
    dest: "public",
    register: true,
    disable: process.env.NODE_ENV === 'development',
    skipWaiting: true,
  },
  reactStrictMode: true,
  images: {
    domains: ['codingideas.vercel.app'],
  },
  webpack: (config, options) => {
    config.module.rules.push(tracedImages)
    return config
  }

});

RenatoCesarF avatar Mar 17 '22 17:03 RenatoCesarF

Unfortunately, I'm getting the same error.

chmielulu avatar Apr 07 '22 10:04 chmielulu