Repository: withastro/astro
File: packages/astro/src/core/server-islands/vite-plugin-server-islands.ts (TypeScript)

Code before:
			viteServer = _server;
		},
		resolveId(name) {
			if (name === VIRTUAL_ISLAND_MAP_ID) {
				return RESOLVED_VIRTUAL_ISLAND_MAP_ID;
			}
		},
		load(id) {
			if (id === RESOLVED_VIRTUAL_ISLAND_MAP_ID) {
				return { code: `export const serverIslandMap = ${serverIslandPlaceholder};` };
			}
		},
		transform(_code, id) {
			if (id.endsWith('.astro')) {
				const info = this.getModuleInfo(id);
				if (info?.meta) {
					const astro = info.meta.astro as AstroPluginMetadata['astro'] | undefined;
					if (astro?.serverComponents.length) {
						for (const comp of astro.serverComponents) {
							if (!settings.serverIslandNameMap.has(comp.resolvedPath)) {
								if (!settings.adapter) {
									logger.error(
										'islands',
										'You tried to render a server island without an adapter added to your project. An adapter is required to use the `server:defer` attribute on any component. Your project will fail to build unless you add an adapter or remove the attribute.',
									);
								}

								let name = comp.localName;
								let idx = 1;

								while (true) {
									// Name not taken, let's use it.
									if (!settings.serverIslandMap.has(name)) {
										break;
									}
									// Increment a number onto the name: Avatar -> Avatar1
									name += idx++;
								}

								// Append the name map, for prod
								settings.serverIslandNameMap.set(comp.resolvedPath, name);

								settings.serverIslandMap.set(name, () => {
									return viteServer?.ssrLoadModule(comp.resolvedPath) as any;
								});

								// Build mode
								if (command === 'build') {
									let referenceId = this.emitFile({
										type: 'chunk',
										id: comp.specifier,

Review comment (bug):
```suggestion
						logger.error(
							'islands',
							'You tried to render a server island without an adapter added to your project. An adapter is required to use the `server:defer` attribute on any component. Your project will fail to build unless you add an adapter or remove the attribute.',
						);
						continue;
```
We should not process the island, I think. Make sure to print the name of the component, so the users know which component island is failing. 

Code after:
			viteServer = _server;
		},
		resolveId(name) {
			if (name === VIRTUAL_ISLAND_MAP_ID) {
				return RESOLVED_VIRTUAL_ISLAND_MAP_ID;
			}
		},
		load(id) {
			if (id === RESOLVED_VIRTUAL_ISLAND_MAP_ID) {
				return { code: `export const serverIslandMap = ${serverIslandPlaceholder};` };
			}
		},
		transform(_code, id) {
			// We run the transform for all file extensions to support transformed files, eg. mdx
			const info = this.getModuleInfo(id);
			if (!info?.meta?.astro) return;

			const astro = info.meta.astro as AstroPluginMetadata['astro'];

			for (const comp of astro.serverComponents) {
				if (!settings.serverIslandNameMap.has(comp.resolvedPath)) {
					if (!settings.adapter) {
						logger.error(
							'islands',
							'You tried to render a server island without an adapter added to your project. An adapter is required to use the `server:defer` attribute on any component. Your project will fail to build unless you add an adapter or remove the attribute.',
						);
					}

					let name = comp.localName;
					let idx = 1;

					while (true) {
						// Name not taken, let's use it.
						if (!settings.serverIslandMap.has(name)) {
							break;
						}
						// Increment a number onto the name: Avatar -> Avatar1
						name += idx++;
					}

					// Append the name map, for prod
					settings.serverIslandNameMap.set(comp.resolvedPath, name);

					settings.serverIslandMap.set(name, () => {
						return viteServer?.ssrLoadModule(comp.resolvedPath) as any;
					});

					// Build mode
					if (command === 'build') {
						let referenceId = this.emitFile({
							type: 'chunk',