Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module '@rollup/pluginutils' #54

Closed
sntsris opened this issue Jan 13, 2024 · 6 comments
Closed

Error: Cannot find module '@rollup/pluginutils' #54

sntsris opened this issue Jan 13, 2024 · 6 comments

Comments

@sntsris
Copy link

sntsris commented Jan 13, 2024

Hi.
Very nice plugin.

However, I've encountered an issue. When I configure the settings and start the application, I get the following error:

> web@0.0.1 dev
> vite dev

failed to load config from /app/vite.config.ts
error when starting dev server:
Error: Cannot find module '@rollup/pluginutils'
Require stack:
- /app/node_modules/@poppanator/sveltekit-svg/dist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/app/node_modules/@poppanator/sveltekit-svg/dist/index.js:5:23)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at cjsLoader (node:internal/modules/esm/translators:345:17)

Here are the relevant devDependencies from my package.json:

	"devDependencies": {
		"@poppanator/sveltekit-svg": "^4.2.0",
		"@sveltejs/adapter-auto": "^3.0.0",
		"@sveltejs/adapter-cloudflare": "^3.0.1",
		"@sveltejs/kit": "^2.0.0",
		"@sveltejs/vite-plugin-svelte": "^3.0.0",
		"@types/eslint": "8.56.0",
		"@typescript-eslint/eslint-plugin": "^6.0.0",
		"@typescript-eslint/parser": "^6.0.0",
		"eslint": "^8.56.0",
		"eslint-config-prettier": "^9.1.0",
		"eslint-plugin-svelte": "^2.35.1",
		"prettier": "^3.1.1",
		"prettier-plugin-svelte": "^3.1.2",
		"svelte": "^4.2.7",
		"svelte-check": "^3.6.0",
		"sveltekit-superforms": "^1.13.1",
		"svgo": "^3.2.0",
		"tslib": "^2.4.1",
		"typescript": "^5.0.0",
		"vite": "^5.0.3",
		"wrangler": "^3.22.2",
		"zod": "^3.22.4"
	},

Do you have any suggestions on how to resolve this issue? I would greatly appreciate your help.

Thanks!

@codercms
Copy link

I had the same issue with SvelteKit 2, try npm install @rollup/pluginutils --save-dev , it should fix this error

@jakeanq
Copy link

jakeanq commented Jan 14, 2024

When testing 5.0.0-svelte5.0 I encountered the same issue.

On both that version and 4.2.0 the sveltekit-svg package does not appear to list a runtime or peer dependency for @rollup/pluginutils - only a dev dependency.

I think downgrading to @poppanator/sveltekit-svg@4.1.3 (the previous version) would also be a valid workaround, it doesn't use the above package.

poppa added a commit that referenced this issue Jan 14, 2024
@poppa
Copy link
Owner

poppa commented Jan 14, 2024

Sorry guys, my misstake. This should now be fixed in 4.2.1

@poppa
Copy link
Owner

poppa commented Jan 14, 2024

And the experimental support for Svelte5 package should now also be updated: 5.0.0-svelte5.1

@jakeanq
Copy link

jakeanq commented Jan 14, 2024

That fixes it for me on Svelte5, thanks!

@sntsris
Copy link
Author

sntsris commented Jan 14, 2024

thanks!
I have confirmed that it was fixed in Svelte 4.

@sntsris sntsris closed this as completed Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants