Server functions returning page not found
After trying to upgrade to solid-start 0.3.11, I picked up a bug that did not exist in 0.3.10. The strange thing is, downgrading did not fix it. There are server-functions that, instead of running, return my 404 not found page. Any idea how to debug this? My app is not usable.
Could this be related to pnpm workspaces? This server function still works and it is in my main package: https://code.local:3000/_m/src/services/fetchMember.tsx/0/fetchValidatorMembers But this one, imported from another package in the repo, returns a 404 not found html page: https://code.local:3000/_m/home/james/dev/ipall/nol-core/src/stores/cause.tsx/0/fetchCauses In the later, should it really have use the path from the "/" root (with /home/james/dev) in it? "ipall" is the work-space root. Again, this was working for a long time and I did have to hack it. I don't really the exact path though. I have never deployed the app, so I must have gotten it to work somehow then after messing with things this broke. No code changed, I just tried upgrading to 0.3.11 to get this issue and the downgrade does not fix it. I tried various pnpm things like removing the node_modules everywhere, force install, cache clear. I'll should probably start building the 0.3.10 branch and figure out how the server-functions work. If you have any advice on getting setup and debugged server-functions I would appreciate it.
Could this be related to pnpm workspaces? This server function still works and it is in my main package: https://code.local:3000/_m/src/services/fetchMember.tsx/0/fetchValidatorMembers But this one, imported from another package in the repo, returns a 404 not found html page: https://code.local:3000/_m/home/james/dev/ipall/nol-core/src/stores/cause.tsx/0/fetchCauses In the later, should it really have use the path from the "/" root (with /home/james/dev) in it? "ipall" is the work-space root. Again, this was working for a long time and I did have to hack it. I don't really the exact path though. I have never deployed the app, so I must have gotten it to work somehow then after messing with things this broke. No code changed, I just tried upgrading to 0.3.11 to get this issue and the downgrade does not fix it. I tried various pnpm things like removing the node_modules everywhere, force install, cache clear. I'll should probably start building the 0.3.10 branch and figure out how the server-functions work. If you have any advice on getting setup and debugged server-functions I would appreciate it.
3 Replies
It is a standard pnpm dependency
"nol-core": "link:../nol-core",
The work-around is to move or re-create the server-functions in the main project. They can still import from the share project. A symbolic link did not work, the link was resolved to the full system path which now returns the 404 page.Does
pnpm dedupe
help? 🤔Ah, I didn't know about that. No, it deduped something else. I have since upgraded to the latest 0.3.11 everywhere and, with he work around, everything works. It looks like solid-start's server-functions have a bug when it comes to multiple projects. I'm not sure it should expose a full system path either. It looks like another soluition is needed there.