lightninglabs / lightninglabs/lnc-web

Better error handling when loaded in server

Open
#72 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
55
Forks
20
PR merge metrics
No merged PRs in 30d

Description

In frameworks like **NextJS**, components are server side rendered by default unless specified. This causes issues with this lib and causes it to throw a `self is not defined` error which isn't very informative of why it's failing.

It would be nice if this scenario could be handled internally in the lib and return an accurate error of the reason for failing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Reproduce the `self is not defined` failure when the library is loaded during NextJS server-side rendering, then identify the loading path involved; done means this scenario reports an accurate explanation instead of the raw error.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.