All Questions
91 questions
1
vote
1
answer
137
views
NVM not recognized after installation
I have been trying to get nvm to work on my terminal on Mac. I have been following this Tutorial when installing nvm. It gives me this message:
% Total % Received % Xferd Average Speed Time ...
0
votes
0
answers
33
views
Why can I not import from `npm`'s global libraries?
My shell is zsh (which I recently switched to and am still learning) and I am trying to create the following alias:
alias bip39="echo \"import('bip39').then((bip) => bip.generateMnemonic()...
1
vote
0
answers
70
views
In Zsh using Node.js it splits the array to a new line when over a certain length - Would like to keep it on the same line
When I console.log() an array it splits it over a certain length. I would like to keep it on one line as my terminal is large enough.
I could use join() but I am hoping for a permanent solution maybe ...
0
votes
1
answer
121
views
zsh: command not found (after setting package.json bin and installed global)
I tried to make cli app by typescript.
this is my code.
//package.json
{
"name": "jihea-cli",
"version": "1.0.0",
"description": "",
...
1
vote
1
answer
178
views
Node command no longer found after zsh window is closed
When I open a new zsh window, node, npm, and yarn commands are not found, but nvm is. After I run nvm use 18, then node, npm, and yarn are available.
Everything's working great until I open a new zsh ...
0
votes
0
answers
360
views
nvm not properly setting up node for new shell
I installed nvm (node version manager) on my new M1 Max MacStudio via Homebrew. I'm not sure what I'm doing wrong, but if I start a new zsh shell and type in node -v I get command not found.
I'm not ...
0
votes
0
answers
17
views
Why is a different zsh used when I manually ssh vs ssh inside a script file? [duplicate]
I have a deploy.sh file that I would like to run from my local macbook that will ssh into a remote Ubuntu 22 server and run a few commands there. Example here:
#!/opt/homebrew/bin/zsh
main() {
scp \...
1
vote
1
answer
98
views
Programmatically emulating and capturing a shell as a terminal [closed]
I want to use node.js to capture the output of a shell so that I can send it to another process, and also send input to the shell as if I was a user using the terminal (this is for an automation tool)....
1
vote
0
answers
285
views
Getting the full output from child process in node.js using child_process
I'm running a Node.js script that creates a child process using the spawn function from the child_process module. The child process runs the zsh shell and prompts the user to enter a name using the ...
31
votes
3
answers
19k
views
No preset version installed for command yarn
I have problem with asdf.
I have already install nodejs latest.
asdf install nodejs latest
...
asdf local nodejs latest / asdf global nodejs latest
But if I try
yarn ...
0
votes
2
answers
4k
views
Node.js issues with zsh
I'm running Ubuntu via WSL. I originally had the bash shell running but switched to zsh. Node.js was installed on bash and was up to date. I tried to npm install on a project and noticed that node ...
0
votes
1
answer
910
views
How to run clinic.js with autocannon POST command
When I try to run clinic with autocannon like this I have no issues:
clinic flame --on-port="autocannon localhost:7269/healthcheck" -- node ./dist/src/index.js
If I try to run clinic.js ...
1
vote
2
answers
2k
views
Can't get nvm to change node version via shell script
I am working on two project, one which uses node 16 and one which uses node 18. I created a script in one of the projects to switch to 18 before running next dev.
Note: Nvm works in my terminal. I use ...
1
vote
0
answers
210
views
zsh: killed mkdir -m 700 -p "$SHELL_SESSION_DIR"
I have upgraded my macOS from Monterey to Ventura and now I am constantly, when opening terminal, getting an error:
zsh: killed mkdir -m 700 -p "$SHELL_SESSION_DIR"
Then when I run npm ...
3
votes
0
answers
759
views
How do I run node command from the MacOS Shortcuts app "Run Shell Script" action?
I'm trying to run a node.js script from a "Shortcut". Unfortunately, when using the "Run Shell Script" action in a "Shortcut" in the MacOS Shortcuts App, it doesn't have ...