Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/bin/sh: line 1: npx: command not found #2401

Open
hrqmonteiro opened this issue Feb 13, 2024 · 4 comments
Open

/bin/sh: line 1: npx: command not found #2401

hrqmonteiro opened this issue Feb 13, 2024 · 4 comments

Comments

@hrqmonteiro
Copy link

This is a pseudo terminal, only used for hosting the Jack-in REPL process. It takes no input.
Pressing ctrl+c with this terminal focused, killing this terminal, or closing/reloading the VS Code window will all stop/kill the Jack-in REPL process.

⚡️ Starting the REPL ⚡️ using the below command line:
pushd /home/hrq/Projects/clojure/reframeexample ; npx shadow-cljs -d cider/cider-nrepl:0.28.5 watch :app ; popd
/bin/sh: line 1: npx: command not found
Jack-in process exited. Status: 127

Screenshot_20240212_222941

@PEZ
Copy link
Collaborator

PEZ commented Feb 13, 2024

Hi! Do you have nodejs installed? If you do, it could be that VS Code isn't started with nodejs binaries on its path. Try starting VS Code from the command line in a terminal where you know npx is available.

@hrqmonteiro
Copy link
Author

Hi! Do you have nodejs installed? If you do, it could be that VS Code isn't started with nodejs binaries on its path. Try starting VS Code from the command line in a terminal where you know npx is available.

I have. I use it daily since i am a React developer.

which node
/run/user/1000/fnm_multishells/224516_1707818152104/bin/node

And it's no use to start code from terminal, since it doesn't log anything, it's the same as opening normally?

@hrqmonteiro
Copy link
Author

Is there anything else i could do?

I also tried removing the Node version from fnm and installed using my package manager (Pacman, on manjaro), and the same thing happened.

@PEZ
Copy link
Collaborator

PEZ commented Feb 13, 2024

And it's no use to start code from terminal, since it doesn't log anything, it's the same as opening normally?

Did you try it?

which node
/run/user/1000/fnm_multishells/224516_1707818152104/bin/node

And for good measure, what does which npx say?

Is there anything else i could do?

You can try starting the Project REPL manually and then connecting to it. From the project root:

$ npm i
$ shadow-cljs -d cider/cider-nrepl:0.28.5 watch :app

Then in VS Code use the command: Calva: Connect to a running REPL server in the Project and select shadow-cljs as the Project type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants