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

example/server is out of date? #8

Closed
michielbdejong opened this issue Jul 16, 2020 · 1 comment
Closed

example/server is out of date? #8

michielbdejong opened this issue Jul 16, 2020 · 1 comment

Comments

@michielbdejong
Copy link
Collaborator

When trying to run the server example:

loopy:solid-auth-fetcher michiel$ cd examples/server/
loopy:server michiel$ npm run dev

> solid-auth-fetcher-node-example@1.0.0 dev /Users/michiel/gh/solid/solid-auth-fetcher/examples/server
> ts-node-dev src/server.ts

Using ts-node version 8.10.2, typescript version 3.9.6
Compilation error in /Users/michiel/gh/solid/solid-auth-fetcher/examples/server/src/server.ts
[ERROR] 11:33:17 ⨯ Unable to compile TypeScript:
src/server.ts:7:34 - error TS2307: Cannot find module 'solid-auth-fetcher/dist/neededAction/INeededRedirectAction' or its corresponding type declarations.

7 import INeedeRedirectAction from "solid-auth-fetcher/dist/neededAction/INeededRedirectAction";
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/server.ts:67:39 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

67     sessions[req.session.localUserId].webId
                                         ~~~~~
src/server.ts:70:48 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

70       webId: sessions[req.session.localUserId].webId,
                                                  ~~~~~
src/server.ts:83:39 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

83     sessions[req.session.localUserId].webId
                                         ~~~~~
src/server.ts:87:25 - error TS2339: Property 'fetch' does not exist on type 'ISolidSession'.
  Property 'fetch' does not exist on type 'ILoggedOutSolidSession'.

87     ] as ISolidSession).fetch("http://localhost:10100/", {});
                           ~~~~~
src/server.ts:89:48 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

89       webId: sessions[req.session.localUserId].webId,
                                                  ~~~~~
src/server.ts:102:39 - error TS2339: Property 'webId' does not exist on type 'ISolidSession'.
  Property 'webId' does not exist on type 'ILoggedOutSolidSession'.

102     sessions[req.session.localUserId].webId
                                          ~~~~~
src/server.ts:104:45 - error TS2339: Property 'logout' does not exist on type 'ISolidSession'.
  Property 'logout' does not exist on type 'ILoggedOutSolidSession'.

104     await sessions[req.session.localUserId].logout();
                                                ~~~~~~

@michielbdejong
Copy link
Collaborator Author

The server example seems out of date. Will look at rewriting it once I have a better understanding of the code.

@michielbdejong michielbdejong changed the title Cannot find module 'solid-auth-fetcher/dist/neededAction/INeededRedirectAction' or its corresponding type declarations. example/server is out of date? Jul 16, 2020
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

1 participant