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

run-server.sh not working for me #83

Open
charlespax opened this issue Jun 3, 2021 · 1 comment
Open

run-server.sh not working for me #83

charlespax opened this issue Jun 3, 2021 · 1 comment

Comments

@charlespax
Copy link

I am experiencing an issue running the dev environment using the "fake" option. Is there an obvious mistake I am making? Would any other information be helpful?

charles@matebook:~/github/fork-explorer$ deno --version
deno 1.9.2 (release, x86_64-unknown-linux-gnu)
v8 9.1.269.5
typescript 4.2.2
⋮
INFO Download https://cdn.esm.sh/v41/[email protected]/deno/d3-ease.js
INFO Download https://cdn.esm.sh/v41/[email protected]/deno/d3-timer.js
INFO   {} /pages/stats.js • 968KB
INFO   {} main.js • 926B
INFO - Public Assets
INFO   ∆ /favicon.ico • 10KB
INFO   ∆ /favicon.png • 10KB
INFO Done in 7490ms
⋮
charles@matebook:~/github/fork-explorer$ ./run-server.sh 
Check file:///home/charles/github/fork-explorer/index.ts
error: TS2322 [ERROR]: Type '"real"' is not assignable to type '"fake"'.
  mode: "real",
  ~~~~
    at file:///home/charles/github/fork-explorer/config/config.ts:88:3

    The expected type comes from property 'mode' which is declared here on type 'Config'
      mode: "fake";
      ~~~~
        at file:///home/charles/github/fork-explorer/config/config.ts:5:3

TS2367 [ERROR]: This condition will always return 'false' since the types '"fake"' and '"real"' have no overlap.
  const createBlock = config.mode === "real" ? createRealBlock : createFakeBlock;
                      ~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/charles/github/fork-explorer/backend/blocks/index.ts:44:23

TS2367 [ERROR]: This condition will always return 'false' since the types '"fake"' and '"real"' have no overlap.
  const createBlock = config.mode === "real" ? createRealBlock : createFakeBlock;
                      ~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/charles/github/fork-explorer/backend/blocks/index.ts:71:23

TS2367 [ERROR]: This condition will always return 'false' since the types '"fake"' and '"real"' have no overlap.
  const callGetblockcount = config.mode === "real" ? getblockcount : async () => await Promise.resolve(1000);
                            ~~~~~~~~~~~~~~~~~~~~~~
    at file:///home/charles/github/fork-explorer/backend/blocks/index.ts:72:29

Found 4 errors.
⋮

charles@matebook:~/github/fork-explorer$ 
@hsjoberg
Copy link
Owner

hsjoberg commented Jun 4, 2021

Is there an obvious mistake I am making?

@charlespax it looks like you're changing the interface instead of actual config variable.
The config is further down in the file:

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

2 participants