[BUG] Running a ssx-test-express-api server in development results in an error
Closed this issue · 3 comments
umate commented
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
yarn dev
results in an error:
6:58:59 PM - Starting compilation in watch mode...
[0]
[1] /Users/art/Code/OSS/ssx/node_modules/ts-node/src/index.ts:859
[1] return new TSError(diagnosticText, diagnosticCodes, diagnostics);
[1] ^
[1] TSError: ⨯ Unable to compile TypeScript:
[1] src/index.ts(5,93): error TS2307: Cannot find module '@spruceid/ssx-server' or its corresponding type declarations.
[1] src/index.ts(39,12): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[1] src/index.ts(43,42): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[1] src/index.ts(47,17): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[1]
[1] at createTSError (/Users/art/Code/OSS/ssx/node_modules/ts-node/src/index.ts:859:12)
[1] at reportTSError (/Users/art/Code/OSS/ssx/node_modules/ts-node/src/index.ts:863:19)
[1] at getOutput (/Users/art/Code/OSS/ssx/node_modules/ts-node/src/index.ts:1077:36)
[1] at Object.compile (/Users/art/Code/OSS/ssx/node_modules/ts-node/src/index.ts:1433:41)
[1] at Module.m._compile (/Users/art/Code/OSS/ssx/node_modules/ts-node/src/index.ts:1617:30)
[1] at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
[1] at Object.require.extensions.<computed> [as .ts] (/Users/art/Code/OSS/ssx/node_modules/ts-node/src/index.ts:1621:12)
[1] at Module.load (node:internal/modules/cjs/loader:1037:32)
[1] at Function.Module._load (node:internal/modules/cjs/loader:878:12)
[1] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:82:12) {
[1] diagnosticCodes: [ 2307, 2339, 2339, 2339 ]
[1] }
[1] [nodemon] app crashed - waiting for file changes before starting...
[0] src/index.ts(5,93): error TS2307: Cannot find module '@spruceid/ssx-server' or its corresponding type declarations.
[0] src/index.ts(39,12): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[0] src/index.ts(43,42): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[0] src/index.ts(47,17): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[0] src/redis.ts(5,93): error TS2307: Cannot find module '@spruceid/ssx-server' or its corresponding type declarations.
[0] src/redis.ts(41,15): error TS7006: Parameter 'session' implicitly has an 'any' type.
[0] src/redis.ts(63,12): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[0] src/redis.ts(67,42): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[0] src/redis.ts(71,17): error TS2339: Property 'ssx' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
[0]
[0] 6:59:00 PM - Found 9 errors. Watching for file changes.
Expected Behavior
Server is expected to start
Steps To Reproduce
Env
Node version: v19.0.1
OS: Darwin Kernel Version 22.1.0: root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
git clone https://github.com/spruceid/ssx.git
cd ssx/examples/ssx-test-express-api
yarn
yard dev
Anything else?
No response
w4ll3 commented
make sure you have installed and built ssx packages (yarn && yarn build) at the main directory
obstropolos commented
Closing this here for now - will update instructions on these as well.