jesseduffield/lazynpm

Error on lazynpm execution

Closed this issue · 4 comments

Describe the bug
1.Installed via homebrew

  1. run lazynpm

  2. Result:

2020/04/18 08:31:19 An error occurred! Please create an issue at https://github.com/jesseduffield/lazynpm/issues

*errors.errorString Must open lazynpm in an npm package
/home/runner/work/lazynpm/lazynpm/pkg/gui/gui.go:363 (0x14c4470)
/home/runner/work/lazynpm/lazynpm/pkg/gui/gui.go:331 (0x14c428b)
/home/runner/work/lazynpm/lazynpm/pkg/gui/layout.go:412 (0x14d0506)
/home/runner/work/lazynpm/lazynpm/pkg/gui/layout.go:344 (0x14d0511)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:420 (0x1200c60)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:536 (0x12017d6)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:444 (0x1200ea3)
/home/runner/work/lazynpm/lazynpm/pkg/gui/gui.go:236 (0x14c3483)
/home/runner/work/lazynpm/lazynpm/pkg/gui/gui.go:280 (0x14c3b9f)
/home/runner/work/lazynpm/lazynpm/pkg/app/app.go:120 (0x14e9984)
/home/runner/work/lazynpm/lazynpm/main.go:63 (0x14e9997)
/opt/hostedtoolcache/go/1.14.2/x64/src/runtime/proc.go:203 (0x1034b42)
/opt/hostedtoolcache/go/1.14.2/x64/src/runtime/asm_amd64.s:1373 (0x1061fa1)

MacOS Catalina 10.15.4
node 12.13.0
nodenv 1.3.2

same for global npm stuff. Works if there's local node_modules

It should always work if there's a package.json file at the root of the package. Is that not the case here? And if not, what behaviour would you expect to see? the package.json file is how the program works out what dependencies/scripts to display, so without it things will get tricky

got ya. I thought it would list global npm stuff

Yes, that was it! Thanks!

got ya. I thought it would list global npm stuff

Actually that would be nice,yes.