vypxl
vypxl
SSolidJS
Created by vypxl on 12/29/2023 in #support
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)
9 replies