Failing to resolve solid-js/web #5420
Send to my agentWhich project does this relate to?#
Router
Describe the bug#
I cannot build my project anymore after version 1.132.51 as I'm receiving the following error:
error during build:
[vite]: Rollup failed to resolve import "solid-js/web" from ".../node_modules/@tanstack/router-devtools-core/dist/index-BiZF0hsR.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
I'm not sure if this is because you moved solid-js from dependencies to devDependencies, but it doesn't make sense for me to install solid-js in my project.
Your Example Website or App#
https://github.com/TanStack/router/releases/tag/v1.132.51
Steps to Reproduce the Bug or Issue#
- Update @tanstack/react-router-devtools to v1.132.51 and build a project with vite
- It will output an error message like
error during build:
[vite]: Rollup failed to resolve import "solid-js/web" from ".../node_modules/@tanstack/router-devtools-core/dist/index-BiZF0hsR.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
Expected behavior#
As a user I expect not to have to install solid-js library to use tanstack router devtools
Screenshots or Videos#
No response
Platform#
- Router: 1.132.51
- OS: macOS
- Bundler: vite
- Bundler Version: 7.1.9
Additional context#
No response
Okay, not sure about the other issue I hit trying to reproduce this, but I've sent a fix for the issue originally described here
I am having the same issue: Module not found: Error: Can't resolve 'solid-js/web' for tanstack router devtools. node_modules@tanstack\router-devtools-core\dist 6 of theses errors
I removed my node modules, reinstalled everything, cleared my cache. still the same
Same here
{ "@tanstack/react-devtools": "^0.7.0", "@tanstack/react-router": "^1.132.0", "@tanstack/react-router-devtools": "^1.132.0", "@tanstack/router-plugin": "^1.132.0" }Me too
I suppose I caused this in #5406, but I can't reproduce this because I'm getting a different error. I tried to create a new app following the docs and then build it:
pnpx create-tsrouter-app@latest my-test-tanstack-app --template file-router cd my-test-tanstack-app pnpm buildI got the error:
error during build: rollupOptions.input should not be an html file when building for SSR. Please specify a dedicated SSR entry.When I upgraded an existing project I have to the latest version and then rebuilt it, it succeeded without error.
yarn create create-tsrouter-app@latest my-test-tanstack-app --template file-router cd my-test-tanstack-app yarn buildYou moved solid-js to dev dependencies, and now it has to be installed manually in the project to avoid an error.
Have this issue with
{ "@tanstack/react-query": "^5.83.0", "@tanstack/react-router": "^1.129.8", "@tanstack/react-router-devtools": "^1.129.8", "@tanstack/router-plugin": "^1.129.8" }Same issue on vercel deployment
[vite]: Rollup failed to resolve import "solid-js/web" from "/vercel/path0/node_modules/@tanstack/router-devtools-core/dist/index-BiZF0hsR.js". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to `build.rollupOptions.external` at viteLog (file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-Chhhsdoe.js:33989:57) at onRollupLog (file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-Chhhsdoe.js:34021:7) at onLog (file:///vercel/path0/node_modules/vite/dist/node/chunks/dep-Chhhsdoe.js:33821:4) at file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:20937:32 at Object.logger [as onLog] (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:22823:9) at ModuleLoader.handleInvalidResolvedId (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:21567:26) at file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:21525:26 error Command failed with exit code 1.The issue is that when I tested https://github.com/TanStack/router/pull/5406, I had
solidin mynode_modules, so didn't notice that the bundling wasn't actually happening and it allowed the app to work on my machine. https://github.com/TanStack/router/pull/5422 should fix it, but it requires updating@tanstack/config, which isn't working and I'm going to need some help with that as I have no idea what the issue with the upgrade isschiller-manuel(GitHub profile, opens in a new tab) added labelsneeded-for-start-stable
birkskyum(GitHub profile, opens in a new tab) closed this
Hello 👋
This was marked as completed and released in https://github.com/TanStack/router/releases/tag/v1.133.2, but I can't see new versions of the devtools packages.
Am I misunderstanding?
Thanks!
You're absolutely right, a new version of router-devtools-core and downstream dependants have to be published. I tried getting this moving today, and hit some CI issues with Nx Cloud not responding - I'll trigger a publish workflow asap
@tmarnet , this should be resolved with the new 1.133.3 releases - can you confirm that is the case?
@tmarnet , this should be resolved with the new 1.133.3 releases - can you confirm that is the case?
It is! Thank you very much 🙂
Sign in to join this conversation.
I suppose I caused this in https://github.com/TanStack/router/pull/5406, but I can't reproduce this because I'm getting a different error. I tried to create a new app following the docs and then build it:
I got the error:
When I upgraded an existing project I have to the latest version and then rebuilt it, it succeeded without error.