Skip to content

ReferenceError: module is not defined #2

@YugoCode

Description

@YugoCode

First of all thank you making it easier to integrate ReCAPTCHA! :)

I'm using the latest version of sveltekit (SvelteKit v1.0.0-next.203) and just followed your instructions in the README one-by-one.

When I start the dev environment with npm run dev -- --open, I run into the error message below and the page won't get loaded at all.

My svelte.config.js looks like this:

import adapter from '@sveltejs/adapter-static';
import sveltePreprocess from 'svelte-preprocess';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	preprocess: sveltePreprocess(),
	kit: {
		adapter: adapter({
			// default options are shown
			pages: 'build',
			assets: 'build',
			fallback: null,
			precompress: false
		}),
		// hydrate the <div id="svelte"> element in src/app.html
		target: '#svelte'
	}
};

export default config;

Error Message

[vite] Error when evaluating SSR module /node_modules/debug/src/index.js?v=338ddabd:
ReferenceError: module is not defined
    at /node_modules/debug/src/index.js?v=338ddabd:9:2
    at instantiateModule (/Users/**********/node_modules/vite/dist/node/chunks/dep-24a6b4c4.js:60096:15)

Do you know what the problem is? I don't even need SSR, it will be just a static page, but since the features even state 'svelte server side rendering (SSR) friendly', I guess I'm doing something wrong? 😅

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