You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to setup Vite + Vue.js in SSR mode. I am following the docs Vite - Server-Side Rendering .
But when I adapt to the my contexte, and rename the server.js to server.ts, I get the error from logs below.
yarn run v1.22.22
$ ts-node -r tsconfig-paths/register bin/www
/home/nicodel/dev/countdowns/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
src/server.ts:9:10 - error TS2305: Module '"vite"' has no exported member 'createServer'.
9 import { createServer } from 'vite';~~~~~~~~~~~~
at createTSError (/home/nicodel/dev/countdowns/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/home/nicodel/dev/countdowns/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/home/nicodel/dev/countdowns/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/home/nicodel/dev/countdowns/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/home/nicodel/dev/countdowns/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Object.require.extensions.<computed> [as .ts] (/home/nicodel/dev/countdowns/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Function.Module._load (node:internal/modules/cjs/loader:1024:12)
at Module.require (node:internal/modules/cjs/loader:1233:19) {
diagnosticCodes: [ 2305 ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
I am trying to setup Vite + Vue.js in SSR mode. I am following the docs Vite - Server-Side Rendering .
But when I adapt to the my contexte, and rename the
server.js
toserver.ts
, I get the error from logs below.Reproduction
https://gitlab.com/nicodel/countdowns/-/tree/v2?ref_type=heads
Steps to reproduce
Run
yarn install
, thenyarn start
.System Info
Used Package Manager
yarn
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: