I am new to Linux and Joplin, I have installed joplin desktop and it works, but when installing the terminal version, it has following errors, I am on Ubuntu18.04, using this command: NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
Errors:
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -2
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/laurent22/node-emoji.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Welcome to the community and welcome to the wonderful world of Linux, where a vast majority of what will define your enjoyment will depend heavily on how willing you are to scour forums and the internet for answers to many crazy problems you’ll run into. It’s part of what i personally love about the platform.
After a quick search, the error you’re running into is most likely a cache problem.
Your npm cache could have some corrupted files. I would run npm cache verify
to check if there any issues with it. If there are, it should fix the issues by itself. I would also run sudo npm cache verify
to check if your global installs are having issues also. (Made some minor edits here since my original instructions were definitely outdated).
Go ahead and run NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin
to install joplin locally. (Made a correction here from original posting on my phone after discovering I was wrong when I got to my PC).
Then, add export PATH="$PATH:$HOME/.joplin-bin/bin"
to the bottom of both your $HOME/.bash_profile and $HOME/.profile files. The reason I’m using $HOME instead of ~ for your home directory is because some distros and configurations won’t use the latter at all and will throw some possible errors.
Restart.
Open a terminal and run
echo $PATH
It should show a bunch of directories with bin in them and then the one I had you add above. These are where your system will look for new programs so you can run them from your terminal or program launcher without having to type each path out.
If you’re still having issues, feel free to respond.
Hey ,
I am having the same issue as DoubleK66 and in specific am getting a git permission denied reply.
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/laurent22/uslug.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-03-09T08_38_37_234Z-debug-0.log
I did a cache verify of npm and it was a success and i also managed to re-install git to the latest version.
I'll appreciate some insights .Thanks!
I have the exact same issue and I am not able to figure out where I went wrong.
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/laurent22/uslug.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.