jesseduffield / jesseduffield/lazynpm

*errors.errorString Must open lazynpm in an npm package

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
861
Forks
40
PR merge metrics
No merged PRs in 30d

Description

@dollengo ~ > lazynpm
2024/08/06 17:29:09 An error occurred! Please create an issue at https://github.com/jesseduffield/lazynpm/issues

*errors.errorString Must open lazynpm in an npm package
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/gui/gui.go:363 (0x84f2a5)
(*Gui).updateRecentPackagesList: return errors.New("Must open lazynpm in an npm package")
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/gui/gui.go:331 (0x84f18f)
(*Gui).loadNewRepo: if err := gui.updateRecentPackagesList(); err != nil {
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/gui/layout.go:412 (0x85a53b)
(*Gui).onInitialViewsCreation: return gui.loadNewRepo()
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/gui/layout.go:344 (0x85a541)
(*Gui).layout: if err := gui.onInitialViewsCreation(); err != nil {
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20200415100931-3c4f0994aca5/gui.go:420 (0x5f94b9)
ManagerFunc.Layout: return f(g)
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20200415100931-3c4f0994aca5/gui.go:536 (0x5f9cab)
(*Gui).flush: if err := m.Layout(g); err != nil {
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20200415100931-3c4f0994aca5/gui.go:444 (0x5f972a)
(*Gui).MainLoop: if err := g.flush(); err != nil {
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/gui/gui.go:236 (0x84e785)
(*Gui).Run: err = g.MainLoop()
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/gui/gui.go:280 (0x84ec85)
(*Gui).RunWithSubprocesses: if err := gui.Run(); err != nil {
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/app/app.go:120 (0x86d725)
main: err := app.Gui.RunWithSubprocesses()
/home/dollengo/.local/share/go/pkg/mod/github.com/jesseduffield/lazynpm@v0.1.4/pkg/app/app.go:120 (0x86d718)
(*App).Run: err := app.Gui.RunWithSubprocesses()
/usr/local/go/src/runtime/internal/atomic/types.go:194 (0x43fd9d)
(*Uint32).Load: return Load(&u.value)
/usr/local/go/src/runtime/asm_amd64.s:1695 (0x472d41)
goexit: BYTE $0x90 // NOP

@dollengo ~ >

Contributor guide

Open the contributing guide

Research direction

Start with pkg/gui/gui.go, especially updateRecentPackagesList and loadNewRepo, using the reported `lazynpm` command from `~` and the stack trace as the reproduction path. Investigate the behavior when lazynpm is opened outside an npm package; completion should address the reported failure, with a regression check if an appropriate test location is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, node.js
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.