question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[3.9.3][Mac] Search errors out with ENOENT

See original GitHub issue

OS/Web Information

  • Web Browser: Safari
  • Local OS: MacOS 11.3
  • Remote OS: MacOS 10.15.17
  • Remote Architecture: x64
  • code-server --version: 3.9.3 fe2dc2deb08e378069891b622bb62ad1d261d1b1

Steps to Reproduce

  1. Open project
  2. Search
  3. Try to search for something in the project
  4. Get ENOENT error

Expected

Search to produce results

Actual

Error message (see screenshot)

Screenshot

Screen Shot 2021-04-12 at 2 03 02 PM

Notes

> stat ~/.local/lib/code-server-3.9.3/lib/vscode/node_modules/vscode-ripgrep 
16777224 213605904 drwxr-xr-x 10 local staff 0 320 "Apr 12 13:59:51 2021" "Apr  8 11:32:45 2021" "Apr 12 13:59:54 2021" "Apr  8 11:32:45 2021" 4096 0 0 /Users/local/.local/lib/code-server-3.9.3/lib/vscode/node_modules/vscode-ripgrep
> ls ~/.local/lib/code-server-3.9.3/lib/vscode/node_modules/vscode-ripgrep/bin 
<nothing there>

I deleted the entire code-server install and re-installed and the issue persisted:

> curl -fsSL https://code-server.dev/install.sh | sh
macOS v10.15.7
Homebrew not installed.
Installing standalone release archive v3.9.3 from GitHub releases.

+ Reusing ~/.cache/code-server/code-server-3.9.3-macos-amd64.tar.gz
+ mkdir -p ~/.local/lib ~/.local/bin
+ tar -C ~/.local/lib -xzf ~/.cache/code-server/code-server-3.9.3-macos-amd64.tar.gz
+ mv -f ~/.local/lib/code-server-3.9.3-macos-amd64 ~/.local/lib/code-server-3.9.3
+ ln -fs ~/.local/lib/code-server-3.9.3/bin/code-server ~/.local/bin/code-server

Standalone release has been installed into ~/.local/lib/code-server-3.9.3
Please extend your path to use code-server:
  PATH="$HOME/.local/bin:$PATH"
Then you can run:
  code-server

This issue can be reproduced in VS Code: No

I found other people reporting this but its suppose to be fixed now so reporting it again: https://github.com/cdr/code-server/issues/1907 https://github.com/cdr/code-server/issues/1683

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
yzgyyangcommented, May 3, 2021

Follow up on ^:

If a prebuilt binary for ripgrep does not exist for your platform, simply install ripgrep and copy the binary into the bin folder:

cp /usr/local/bin/rg /usr/local/lib/node_modules/code-server/lib/vscode/node_modules/vscode-ripgrep/bin

At least this is how it does for the FreeBSD port for vscode: https://cgit.freebsd.org/ports/tree/editors/vscode/Makefile?id=982ce2ea27d8d41ed4f69c6c8f1eb56f04280531#n178.

2reactions
yzgyyangcommented, May 3, 2021

I encountered this on FreeBSD -

image

but the workaround doesn’t work here:

root@FreeBSD-VM:/usr/local/lib/node_modules/code-server # node ./lib/vscode/node_modules/vscode-ripgrep/lib/postinstall.js
Unhandled rejection:  Promise {
  <rejected> Error: Unknown platform: freebsd
      at getTarget (/usr/local/lib/node_modules/code-server/lib/vscode/node_modules/vscode-ripgrep/lib/postinstall.js:45:24)
      at main (/usr/local/lib/node_modules/code-server/lib/vscode/node_modules/vscode-ripgrep/lib/postinstall.js:63:17)
} reason: Error: Unknown platform: freebsd
    at getTarget (/usr/local/lib/node_modules/code-server/lib/vscode/node_modules/vscode-ripgrep/lib/postinstall.js:45:24)
    at main (/usr/local/lib/node_modules/code-server/lib/vscode/node_modules/vscode-ripgrep/lib/postinstall.js:63:17)

I guess an issue should be opened for vscode-ripgrep though 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

[3.9.3][Mac] Search errors out with ENOENT #3117 - GitHub
Though I do think I could have installed ripgrep separately outside of code-server hence why. Not sure if that could be affecting this....
Read more >
npm install errors with Error: ENOENT, chmod - Stack Overflow
I am using sudo and I have triple checked everything in the package everything should work. I did some searching around, and saw...
Read more >
What causes ENOENT errors? - Super User
I am running a Node script and am getting this error at this path: ENOENT ../.
Read more >
Mac OS X Manual Page For intro(2) - Apple Developer
This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual...
Read more >
Error: ENOENT: no such file or directory... when requesting URL.
Well, I gave it a good go but I suspect there's some sort of breaking change in the code as it;s been quite...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found