Skip to content

Svelte-Kit: Can't use Image component #109

@r-bt

Description

@r-bt

Hi,

Firstly thanks for making this great library. I'm trying to get to get it setup with Svelte-Kit however importing Image gives me this error:

ENOENT: no such file or directory, open '/Users/richard/Documents/Personal sites/r-bt.com/node_modules/blurhash/src/index.ts'

Steps to reproduce

  1. Create new Svelte-Kit project (issue present on both JS & TS projects
  2. Install svelte-image
  3. Add svelte-image to svelte.config.cjs
const image = require('svelte-image');
/** @type {import('@sveltejs/kit').Config} */
module.exports = {
	kit: {
		// hydrate the <div id="svelte"> element in src/app.html
		target: '#svelte'
	},
	preprocess: {
		...image()
	}
};
  1. Import Image component
  2. Run the dev server

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions