Cannot find module
When running unit test am facing this error
here is my vitest.config.ts configuration
26 Replies
Are you able to update to a more recent version of the router?
@Birk Skyum am not using @solidjs/route am using file routes
"solid-start": "^0.3.10",
afaik
FileRouter
uses @solidjs/router
under the hood. In fact it's just a way to configure the solid-router with the file-system.
would be helpful if you could copy paste ur package.json@Yisacc - Full Stack Dev that is a quite old version of solid start. The newer versions are published as
@solidjs/start
. You might benefit from upgrading.
yeah planning to migrate thank you
@bigmistqke i have posted the list of the packages I am using please check it
Can you try installing
"@solidjs/router": "0.9.1"
with resolutions
in package.jsonoops sorry forgot to reply. but what Birk says is correct: you should install
@solidjs/router
version that is compatible with this older, pre beta 2 version of solid-start
.I already tried that but i faced this error
solid start 0.3.10 is latest version actually i think you are referring solidjs @bigmistqke @Birk Skyum
npm
@solidjs/start
This is the SolidStart framework and CLI.. Latest version: 0.7.7, last published: 18 hours ago. Start using @solidjs/start in your project by running
npm i @solidjs/start
. There is 1 other project in the npm registry using @solidjs/start.oops I see
Ye it's a bit confusing, I agree. I mentioned this in https://discord.com/channels/722131463138705510/861229287868858379/1219336383764893776
yeah it is
It happened when we went to solid start beta V2 if I m not mistaken
oh okay does it have a documentation on what's been changed
I have seen the solid start beta v2 documentation
https://github.com/solidjs/solid-start/discussions/1052 is the announcement
GitHub
SolidStart Beta 2 · solidjs solid-start · Discussion #1052
There has been a lot of anticipation about when SolidStart can get out of Beta and move to 1.0. But unfortunately we are not ready yet. I think that is clear from the nature of bugs and issues we a...
But some things might have changed from that moment on
Beta V2 was quite a big change, a rebase on nitro and a new router. This version will be much closer to the API when it comes out of beta.
yeah but am working on a prod app it will be difficult for me to migrate it just to add a test for one module
Here is a working example of the new solid-start:
https://stackblitz.com/github/solidjs/solid-start/tree/main/examples/basic
What you want to pay attention to is the vite.config.ts -> app.config.ts, where now the vite settings are moved within a vite property { vite: {} }
Also, the entry-server, entry-client changed, and the router api changed, so where it before was:
@Yisacc - Full Stack Dev , I understand the frustration, but there are not being made patch releases to the version you're on currently if something is off.
I can help you with this though:
https://discord.com/channels/722131463138705510/1219260239900053534/1219799164758528001
Does there error say more about where it breaks? It's typically because of useSearchParams, or A used outside the pages.
here is the test
and the above is the import inside the axelar file
Thank You we are planning to migrate the resource you provided is very helpful
You're welcome. I migrated a small app today from
@solidjs/router
migration from 0.8.x -> 0.13.x (not using start), and I had to debug the same error as you, and found I needed to move the useSearchParams inside a Route:
https://github.com/solidjs/solid-playground/pull/165/commits/3004d1d0f0e0b11a3ec66a96a8e80bb0de6cb3abi see great
do you know if we have
redirect and renderStream in the updated version
There is renderToStream in solid-js core https://docs.solidjs.com/reference/rendering/render-to-stream
For the redirect, there is the useNavigate in the router https://docs.solidjs.com/solid-router/reference/primitives/use-navigate