Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Running a ssx-test-express-api server in development results in an error #14

Closed
1 task done
umate opened this issue Nov 9, 2022 · 3 comments
Closed
1 task done

Comments

@umate
Copy link

umate commented Nov 9, 2022

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

  1. git clone https://github.com/spruceid/ssx.git
  2. cd ssx/examples/ssx-test-express-api
  3. yarn
  4. yard dev

Anything else?

No response

@w4ll3
Copy link
Member

w4ll3 commented Nov 9, 2022

make sure you have installed and built ssx packages (yarn && yarn build) at the main directory

@w4ll3
Copy link
Member

w4ll3 commented Nov 9, 2022

@umate did it work for you?

@obstropolos
Copy link
Contributor

Closing this here for now - will update instructions on these as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants