*Npm Run Start* Fails To Mysterious Error

Is there a recommended way to debug solid-start start? I'm running into this issue where my app fails after I build, but in solid-start dev everything is fine. This is the error I'm getting:
file://this/file/path/frontend/dist/server.js:17013
const id = sharedConfig.context.id + sharedConfig.context.count++;
^
TypeError: Cannot read properties of undefined (reading 'id')
at createResource (file:///path/to/my/app/dist/server.js:17013:35)
at file:///path/to/my/app/dist/server.js:20340:1
at ModuleJob.run (node:internal/modules/esm/module_job:192:25)
at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)
file://this/file/path/frontend/dist/server.js:17013
const id = sharedConfig.context.id + sharedConfig.context.count++;
^
TypeError: Cannot read properties of undefined (reading 'id')
at createResource (file:///path/to/my/app/dist/server.js:17013:35)
at file:///path/to/my/app/dist/server.js:20340:1
at ModuleJob.run (node:internal/modules/esm/module_job:192:25)
at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)
I also tried npm --loglevel verbose run build and DEBUG=1 npm run build but neither didn't help uncover what the error is related to..
6 Replies
mdynnl
mdynnl12mo ago
is the repo acessible by some chance? or could you make a repro?
Carlo Nyte
Carlo Nyte12mo ago
Unfortunately it's not =/. The only thing I could thing of that might be causing it to break is that I am using a global signals file to pass around signals between 4-5 components
mdynnl
mdynnl12mo ago
alexis replied in #general maybe check that out if you're using ssr, global signals aren't recommended, you'd want to used context
Carlo Nyte
Carlo Nyte12mo ago
Yea I just saw it. dang
Carlo Nyte
Carlo Nyte12mo ago
hahaha. I wish they just outright said to not do it The issue was create resources on top level/ global are illegal in SSR because resources require an owner