SolidJSS
SolidJS3y ago
8 replies
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/vite@4.5.0/node_modules/vite/dist/client/client.mjs
      at parseAdvanced (file://cwd/node_modules/.pnpm/@vinxi+plugin-directives@0.0.50_vinxi@0.0.59/node_modules/@vinxi/plugin-directives/parse.js:22:13)
      at Object.transform (file://cwd/node_modules/.pnpm/@vinxi+plugin-directives@0.0.50_vinxi@0.0.59/node_modules/@vinxi/plugin-directives/shim-exports.js:26:14)
      at TransformContext.transform (file://cwd/node_modules/.pnpm/@vinxi+plugin-directives@0.0.50_vinxi@0.0.59/node_modules/@vinxi/plugin-directives/plugin.js:49:29)
      at Object.transform (file://cwd/node_modules/.pnpm/vite@4.5.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:44352:62)
      at async loadAndTransform (file://cwd/node_modules/.pnpm/vite@4.5.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55026:29)
      at async viteTransformMiddleware (file://cwd/node_modules/.pnpm/vite@4.5.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:64430:32)
SolidStart Beta Documentation
Early release documentation and resources for SolidStart Beta
SolidStart Beta Documentation
Was this page helpful?