wevm / vocs

Minimal Documentation Framework, powered by React + Vite.
https://vocs.dev
Other
1.14k stars 54 forks source link

"Error when evaluating SSR module" when running vocs dev / build #171

Open Sam-Scolari opened 4 months ago

Sam-Scolari commented 4 months ago

After creating a fresh project through npm init vocs and installing the packages, I get the following error

[vite] Error when evaluating SSR module C:\Users\samsc\Documents\GitHub\emotes\node_modules\vocs\_lib\app\index.server.js: failed to import "/@fs/C:/Users/samsc/Documents/GitHub/emotes/node_modules/vocs/_lib/app/routes.js"
|- Error: Cannot find module 'C:UserssamscDocumentsGitHubemotes
ode_modules
ocs_lib
ite.vocs        heme.css' imported from 'virtual:styles'
    at nodeImport (file:///C:/Users/samsc/Documents/GitHub/emotes/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:55089:25)
    at ssrImport (file:///C:/Users/samsc/Documents/GitHub/emotes/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:54998:30)
    at eval (virtual:styles:3:50)
    at instantiateModule (file:///C:/Users/samsc/Documents/GitHub/emotes/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:55058:15)

node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: Cannot find module 'C:UserssamscDocumentsGitHubemotes
ode_modules
ocs_lib
ite.vocs        heme.css' imported from 'virtual:styles'
    at nodeImport (file:///C:/Users/samsc/Documents/GitHub/emotes/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:55089:25)
    at ssrImport (file:///C:/Users/samsc/Documents/GitHub/emotes/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:54998:30)
    at eval (virtual:styles:3:50)
    at instantiateModule (file:///C:/Users/samsc/Documents/GitHub/emotes/node_modules/vite/dist/node/chunks/dep-cNe07EU9.js:55058:15) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v21.3.0
error: script "dev" exited with code 1

I have back tested to version 1.0.0-alpha.40 and in both Node and Bun runtimes on Windows with the same issue

nordowl commented 2 months ago

Did you find a fix for this? Edit: Apparently there is a fix for it, but the PR hasn't been reviewed yet. https://github.com/wevm/vocs/pull/128