S
SolidJS11mo ago
vypxl

Solid Start Getting Started example not working

I followed the guide at https://start.solidjs.com/getting-started/project-setup , I used pnpm. Also tried it with bun and yarn. Also happens in a fresh docker container. When I run the dev server and load the page in my browser, the site is displayed, but does not work (the basic template click counter). I also get this error in my dev console:
$ pnpm run dev

> solid@ dev cwd
> vinxi dev

vinxi 0.0.59
start {
appRoot: './src',
ssr: true,
islands: false,
server: { base: undefined },
solid: {}
}
vinxi Found vite.config.js with app config
vinxi starting dev server

➜ Local: http://localhost:3000/
➜ Network: use --host to expose

7:20:11 PM [vite] Internal server error: require is not defined
Plugin: vite-server-references
File: cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/client/client.mjs
at parseAdvanced (file://cwd/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vinxi/plugin-directives/parse.js:22:13)
at Object.transform (file://cwd/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vinxi/plugin-directives/shim-exports.js:26:14)
at TransformContext.transform (file://cwd/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vinxi/plugin-directives/plugin.js:49:29)
at Object.transform (file://cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44352:62)
at async loadAndTransform (file://cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55026:29)
at async viteTransformMiddleware (file://cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:64430:32)
$ pnpm run dev

> solid@ dev cwd
> vinxi dev

vinxi 0.0.59
start {
appRoot: './src',
ssr: true,
islands: false,
server: { base: undefined },
solid: {}
}
vinxi Found vite.config.js with app config
vinxi starting dev server

➜ Local: http://localhost:3000/
➜ Network: use --host to expose

7:20:11 PM [vite] Internal server error: require is not defined
Plugin: vite-server-references
File: cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/client/client.mjs
at parseAdvanced (file://cwd/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vinxi/plugin-directives/parse.js:22:13)
at Object.transform (file://cwd/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vinxi/plugin-directives/shim-exports.js:26:14)
at TransformContext.transform (file://cwd/node_modules/.pnpm/@[email protected][email protected]/node_modules/@vinxi/plugin-directives/plugin.js:49:29)
at Object.transform (file://cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44352:62)
at async loadAndTransform (file://cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55026:29)
at async viteTransformMiddleware (file://cwd/node_modules/.pnpm/[email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:64430:32)
SolidStart Beta Documentation
SolidStart Beta Documentation
Early release documentation and resources for SolidStart Beta
5 Replies
vypxl
vypxlOP11mo ago
Node 18, 20 and 21 give this error
Metru
Metru11mo ago
@vypxl So you've run:
pnpm create solid@latest
# followed wizard instructions
pnpm i
pnpm dev
pnpm create solid@latest
# followed wizard instructions
pnpm i
pnpm dev
and nothing else and you get that error? I'm running it fine on node v18 Interesting, this happens only when you choose to use javascript and typescript
matulla_ffm
matulla_ffm11mo ago
Back to Vince 0.0.54 solved the problem
vypxl
vypxlOP11mo ago
A workaround seems to be to rename vite.config.js to vite.config.ts Should this be filed as a bug report? At vinxi? At solid start?
Dakotys
Dakotys10mo ago
Thanks you saved me! Have you filed it as a bug?
Want results from more Discord servers?
Add your server