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

not able to run the website locally #37

Closed
thescientist13 opened this issue Nov 2, 2023 · 4 comments
Closed

not able to run the website locally #37

thescientist13 opened this issue Nov 2, 2023 · 4 comments

Comments

@thescientist13
Copy link
Contributor

Was trying to follow the steps in the README to run the site locally, and experienced this issue

➜  www git:(main) deno run -A --no-check main.jsx
error: The source code is invalid, as it does not match the expected hash in the lock file.
  Specifier: https://esm.sh/*@twind/[email protected]
  Lock file: /Users/owenbuckley/Workspace/github/wintercg/www/deno.lock

Can confirm that deno is installed locally

➜  www git:(main) deno --version
deno 1.38.0 (release, aarch64-apple-darwin)
v8 12.0.267.1
typescript 5.2.2

Any thoughts? I'm new to deno, so not sure if it is just user error or something else 😅

@lucacasonato
Copy link
Member

Try rm deno.lock?

@thescientist13
Copy link
Contributor Author

thescientist13 commented Nov 2, 2023

So in doing that, the server started, but then failed to render the page (presumably because there is no lock file / dependencies anymore?)

✗ deno run -A --no-check main.jsx
Listening on http:https://localhost:8000
ReferenceError: h is not defined
    at file:https:///Users/owenbuckley/Workspace/github/wintercg/www/main.jsx:458:22
    at ssr (https://crux.land/api/get/7GrKMy.ts:55:26)
    at Server.<anonymous> (file:https:///Users/owenbuckley/Workspace/github/wintercg/www/main.jsx:458:12)
    at Server.#respond (https://deno.land/[email protected]/http/server.ts:298:37)
    at Server.#serveHttp (https://deno.land/[email protected]/http/server.ts:340:20)
    at eventLoopTick (ext:core/01_core.js:183:11)
Screenshot 2023-11-02 at 12 07 07 PM

@thescientist13
Copy link
Contributor Author

thescientist13 commented Jan 4, 2024

So I tried the following again and got the site working!

  1. Re-run the deno installer script
  2. Run the deno command to start the site (got the same lock file error)
  3. Remove the deno.lock file
  4. Run the deno command to start the site (now it works!)

Screenshot 2024-01-04 at 10 56 55 AM

So now I have a diff on deno.lock, should I open a PR with those updated contents?

➜  www git:(main) ✗ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   deno.lock

no changes added to commit (use "git add" and/or "git commit -a")

edit: opened #40

@thescientist13
Copy link
Contributor Author

closing now that #40 has been merged.

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