While creating a minimal repository, I took the repo that produces the issue, cloned it, detached it from Git and the remote by removing the .git directory.
The netlify dev command did not produce an error.
Then I did a simple git init (not attached to the original repository)
And the netlify dev command produced the error (run-away process).
Here is a screenflow of this interaction: ➨ https://www.dropbox.com/scl/fi/lr86hiyq7o604ryea1h0j/netlify-issues_001.mp4?rlkey=29rwjqp5ri5enynqh2kflweg2&dl=0
When the process is killed (kill -9 PID), this stack trace is left behind:
Perhaps some bad interactions between netlify and git?
› Error: Netlify CLI has terminated unexpectedly
This is a problem with the Netlify CLI, not with your application.
If you recently updated the CLI, consider reverting to an older version by running:
npm install -g netlify-cli@VERSION
You can use any version from https://ntl.fyi/cli-versions.
Please report this problem at https://ntl.fyi/cli-error including the error details below.
fatal error: all goroutines are asleep - deadlock!
[1] 34029 killed netlify dev
goroutine 1 [chan receive]:
github.com/evanw/esbuild/internal/helpers.(*ThreadSafeWaitGroup).Wait(...)
github.com/evanw/esbuild/internal/helpers/waitgroup.go:36
main.runService.func2()
github.com/evanw/esbuild/cmd/esbuild/service.go:114 +0x88
main.runService(0x1)
github.com/evanw/esbuild/cmd/esbuild/service.go:160 +0x47c
main.main()
github.com/evanw/esbuild/cmd/esbuild/main.go:250 +0xaa0
goroutine 21 [chan receive]:
main.runService.func1()
github.com/evanw/esbuild/cmd/esbuild/service.go:98 +0x40
created by main.runService in goroutine 1
github.com/evanw/esbuild/cmd/esbuild/service.go:97 +0x19c
goroutine 22 [chan receive]:
main.(*serviceType).sendRequest(0x1400012a990, {0x101146700, 0x1400096c180})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0x138
main.runService.func3()
github.com/evanw/esbuild/cmd/esbuild/service.go:125 +0x44
created by main.runService in goroutine 1
github.com/evanw/esbuild/cmd/esbuild/service.go:122 +0x2e4
goroutine 29 [chan receive]:
github.com/evanw/esbuild/internal/bundler.(*scanner).scanAllDependencies(0x140004fa908)
github.com/evanw/esbuild/internal/bundler/bundler.go:2098 +0x1cc
github.com/evanw/esbuild/internal/bundler.ScanBundle(_, {_, _, _, _, _, _}, {_, _}, _, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:1426 +0x87c
github.com/evanw/esbuild/pkg/api.rebuildImpl({0x14000496060, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0xa, 0x1, 0x2, ...}, ...}, ...)
github.com/evanw/esbuild/pkg/api/api_impl.go:1480 +0x1f8
github.com/evanw/esbuild/pkg/api.(*internalContext).rebuild(_)
github.com/evanw/esbuild/pkg/api/api_impl.go:998 +0x2cc
github.com/evanw/esbuild/pkg/api.(*internalContext).Rebuild(...)
github.com/evanw/esbuild/pkg/api/api_impl.go:1059
github.com/evanw/esbuild/pkg/api.Build({0x2, 0x4, 0xa, 0x140004840c0, 0x2, {0x140002066ce, 0x47}, 0x0, 0x0, {0x1400048a000, ...}, ...})
github.com/evanw/esbuild/pkg/api/api.go:387 +0x74
main.(*serviceType).handleBuildRequest(0x1400012a990, 0x6, 0x1400012b0e0)
github.com/evanw/esbuild/cmd/esbuild/service.go:782 +0xc14
main.(*serviceType).handleIncomingPacket.func2()
github.com/evanw/esbuild/cmd/esbuild/service.go:235 +0x58
created by main.(*serviceType).handleIncomingPacket in goroutine 1
github.com/evanw/esbuild/cmd/esbuild/service.go:233 +0x1ac
goroutine 119 [chan receive]:
main.(*serviceType).sendRequest(0x1400012a990, {0x101146700, 0x14000584750})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0x138
main.(*serviceType).convertPlugins.func2.3({{0x14000a8fcb8, 0x5}, {0x14000791380, 0x60}, {0x101009cba, 0x4}, {0x14000791380, _}, _, {_, ...}, ...})
github.com/evanw/esbuild/cmd/esbuild/service.go:997 +0x7c4
github.com/evanw/esbuild/pkg/api.(*pluginImpl).onResolve.func1({{0x14000a8fcb8, 0x5}, {0x14000791380, 0x57}, {0x0, 0x0}, {{0x14000791380, 0x60}, {0x101009cba, 0x4}, ...}, ...})
github.com/evanw/esbuild/pkg/api/api_impl.go:1920 +0x1a4
github.com/evanw/esbuild/internal/bundler.RunOnResolvePlugins({0x140004960c0?, 0x0?, 0x0?}, 0x140004fa488, {0x140004fc000, 0x1400048a1e0, 0x1400048a1f8, 0x1400048e0c0, 0x4, 0x140004841e0}, ...)
github.com/evanw/esbuild/internal/bundler/bundler.go:1010 +0x690
github.com/evanw/esbuild/internal/bundler.parseFile({{0x1011cfc00, 0x1400048e0e0}, {0x140004fc000, 0x1400048a1e0, 0x1400048a1f8, 0x1400048e0c0, 0x4, 0x140004841e0}, 0x140004fa488, 0x14000496060, ...})
github.com/evanw/esbuild/internal/bundler/bundler.go:520 +0x290c
created by github.com/evanw/esbuild/internal/bundler.(*scanner).maybeParseFile in goroutine 29
github.com/evanw/esbuild/internal/bundler/bundler.go:1549 +0xa0c
(base)
~/Code/netlify-test-astro/nfl-backoffice on main! ⌚ 9:11:23 ```