SolidJSS
SolidJSโ€ข4y agoโ€ข
4 replies
seb

Including solidjs router creates multiple instances of solid

I'm trying to add @solidjs/router to a project. But as soon as I import it and add the minimal setup, I get the following warning in my browser console:

You appear to have multiple instances of Solid. This can lead to unexpected behavior.


Removing @solidjs/router resolves the issue.

My imports look like this:
import { Component } from 'solid-js';
import { render } from 'solid-js/web';
import { A, Routes, Route, Router } from '@solidjs/router';


I had a hunch it was a peer-dependency issue, since @solidjs/router specifies solidjs@1.5.3 while I had solidjs@1.6.5 installed, but downgrading to 1.5.3 didn't end up fixing this issue.

Also relevant to note that I'm using vite with vite-plugin-solid and pnpm.

Any idea what I could be doing wrong here?
Was this page helpful?