Meteorite (mrt) command does nothing - linux

I just had to reinstall linux to my computer, so I've been setting up my development environment again. I was able to use Meteor with Meteorite before, but now the mrt command doesn't do anything. It doesn't throw an error or anything, I installed it with sudo -H npm install -g meteorite and then, when I type mrt, it looks like this:
~ $ mrt
~ $
I saw a few similar issues, but no solutions. I think I'm going to try building it myself, but I was hoping someone might already have the answer

i had the same problem under ubuntu.
mrt was looking for an executable node (which was supposed to be nodejs), but in ubuntu if you look at the package node, you get:
$ apt-cache show node
Package: node
Priority: optional
Section: universe/hamradio
Installed-Size: 38
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Original-Maintainer: Debian Hamradio Maintainers <debian-hams#lists.debian.org>
Architecture: all
Version: 0.3.2-7.4
Depends: ax25-node
Conflicts: nodejs-legacy
Filename: pool/universe/n/node/node_0.3.2-7.4_all.deb
Size: 1284
MD5sum: 7385a0f5916e03d9143459ca4706f0ec
SHA1: bf7aa087db81475636897ff39de344754ce1415b
SHA256: 9756770f771bcc4183cffa622f89e21a585be96bd4de27024b0a7cb167f310ad
Description-en: Amateur Packet Radio Node program (transitional package)
The existing node package has been renamed to ax25-node. This transitional
package exists to ease the upgrade path for existing users.
Description-md5: 1278ed271672fd829c99361f93f468da
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
which actually is NOT nodejs. Basically mrt was calling the wrong executable.
I have fixed in the following way:
remove node: sudo apt-get remove node
locate nodejs executable: run which nodejs. to me returned /usr/bin/nodejs
create a link to node: ln -s /usr/bin/nodejs /usr/bin/node
Now mrt calls correctly nodejs and everything works

Related

Update Node.js: Error while updating Node.js on Mac

I am using mac. I have currently installed Node.js 4.4.3
Aleeshas-MacBook-Air:~ aleesha$ node -v
v4.4.3
I want to update Node.js to it's latest version by following these steps.
First I tried to execute: brew update. However, I was getting the below error when I executed the command:
brew update Error: /usr/local is not writable. You should change the
ownership and permissions of /usr/local back to your user account:
sudo chown -R $(whoami) /usr/local
So after searching for solution on Google, I ran this command: sudo chown -R $(whoami) /usr/local
After that I again executed the brew update command. I think it was successfully executed since I didn't see any error message. Last few lines on the command prompt were:
==> Migrating HOMEBREW_REPOSITORY (please wait)...
==> Migrated HOMEBREW_REPOSITORY to /usr/local/Homebrew! Homebrew no longer needs to have ownership of /usr/local.
If you wish you can
return /usr/local to its default ownership with: sudo chown
root:wheel /usr/local Aleeshas-MacBook-Air:~ aleesha$
However after this step when I execute the upgrade command, it failed.
Aleeshas-MacBook-Air:~ aleesha$ brew upgrade node
Error: node not installed
Aleeshas-MacBook-Air:~ aleesha$
I am not sure what exactly needs to be done here.
Thanks
EDIT: Executed brew doctor to check for system anomalies.
Aleeshas-MacBook-Air:~ aleesha$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3-config
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-config
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m-config
Warning: No developer tools installed.
Install the Command Line Tools:
xcode-select --install
Warning: Python is installed at /Library/Frameworks/Python.framework
Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/node/android-ifaddrs.h
/usr/local/include/node/ares.h
/usr/local/include/node/ares_version.h
/usr/local/include/node/libplatform/libplatform.h
/usr/local/include/node/nameser.h
/usr/local/include/node/node.h
/usr/local/include/node/node_buffer.h
You didn't install Node using Homebrew, use this gist to uninstall your current installation of Node.
And then:
brew update && brew install node
It seems like you didn't install nodejs through brew. If you installed Node without brew, brew doesn't recognize it. I had the same issue until I realised that I installed Node with Node Version Manager. Make sure you installed it using Brew.
brew list
Will show you the things brew installed.

centOS can't install nodejs via yum

I was using node v0.10.x on my centOS server and I want to update node.js, so followed some articles. First removing currently installed:
# which node
# cd /usr
# rm -r bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node.1
and then check node -v is not working, good. But using yum doesn't install latest Node.js, so I searched some post and found this:
https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/
so I followed commands:
# rpm -Uvh https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
# yum install nodejs -y
and this is the problem. it prints numerous errors and keeps failing.
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.42-4.el6 will be updated
--> Processing Dependency: nodejs(x86-64) = 0.10.42-4.el6 for package: nodejs-devel-0.10.42-4.el6.x86_64
---> Package nodejs.x86_64 0:5.11.1-1nodesource.el7.centos will be an update
--> Running transaction check
---> Package nodejs-devel.x86_64 0:0.10.42-4.el6 will be updated
---> Package nodejs-devel.x86_64 0:5.11.1-1nodesource.el7.centos will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
nodejs x86_64 5.11.1-1nodesource.el7.centos nodesource 8.7 M
Updating for dependencies:
nodejs-devel x86_64 5.11.1-1nodesource.el7.centos nodesource 7.6 M
Transaction Summary
================================================================================
Upgrade 1 Package (+1 Dependent package)
Total size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction check error:
file /usr/lib/node_modules/npm/node_modules/semver/package.json from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch
file /usr/lib/node_modules/npm/node_modules/semver/bin/semver from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch
file /usr/lib/node_modules/npm/node_modules/semver/semver.js from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch
... and keeps going on ...
Also before remove node, I also did this:
# npm cache clean -f
# npm install -g n
# n stable
but this isn't working at all, because always saying version 0.10.x, even downloaded latest one! ( I sawed 6.2.2 or something )
I think something messed up on my server and I don't know how to fix this. Can anyone gimme some advice? Also If can, I want to install latest Node.js.
Install Node from the EPEL Repository
yum update
yum install epel-release
yum install nodejs
node --version
To access npm to manage their Node packages.
yum install npm
The easiest way is to use nvm, the "Node Version Manager".
In a shell, do:
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Note: If you want to understand the script before running it, read the docs on nvm github page and/or remove | bash from the curl command to read without running the .sh file
Close and re-open shell to use updated profile. Then:
//prints "nvm" if correctly installed
$ command -v nvm
// install latest version of node
$ nvm install node
//check it's installed correctly
$ node -v
v12.6.0
After failing with other methods, this one had no issues.
First, you must install epe-release
sudo yum install epel-release
After, you can install node.js and npm
sudo yum -y install nodejs npm
Its worked for me.
I spent a while on this on a Fedora 35 workstation (upgraded from Fedora 34),
$ yum repolist
nodesource Node.js Packages for Fedora Linux 34 - x86_64
it gave me
$ node --version v12.22.1
None up the installers made a difference until I found this explanation:
How To Install Node.js on Fedora 36/35/34
The tutorial includes 3 methods. It's the third one that worked for me.
Install Node.js on Fedora via NVM
First, install the NVM tool on your system by running the following command:
$ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
Then, reload the system environment using this command. It will set the required environment variables to use nvm on the system.
$ source ~/.bashrc
$ nvm install v16.14
Downloading and installing node v16.14.2...
$ node --version
v16.14.2

Error installing nodejs in arch linux

Okay so i just made a fresh install of nodejs package on archlinux using pacman. Command for the same was
sudo pacman -S nodejs npm . Now when i tried to run the same i am getting error as
node: error while loading shared libraries: libicui18n.so.57: Which pretty much means that libicu is either not there or not the correct version. The problem that i am facing is that it is not there in pacman. I tried
sudo pacman -S libicu, which returned not able to find the package. What is the right way to resolve this issue. FYI : just a note, i would prefer not to install from source and prefer using pacman for the same. If there is any other output that you need to know please comment below and will let you know about the same.
I am currently on manjaro i3 fresh install.
Just found out, The name for package in arch linux is icu and not libicu. Once that is installed node will start working fine.
Update
After using node for quite sometime i realised that a better way to install node is using NVM. It would install both node and npm locally and you get the option to manage multiple version.Installation is as simple as
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
This error is caused by installing node js and npm package modules with missing packages that are unsupported by your system how about you try this:
$ sudo pacman -Rsc -n nodejs
$ sudo pacman -Sy nodejs
$ sudo pacman -Sy npm
did you use testing repo?
If you enabled testing repositories, but later on decided to disable them, you should:
Remove/Comment them from /etc/pacman.conf
pacman -Syuu to "rollback" your updates from these repositories.
The second item is optional, but keep it in mind if you notice any problems.
Also you can install stable ver : pacman -S core/icu
You just need to update arch
sudo pacman -Syu

When I run node, nothing happens, the same with forever

I installed both node.js and forever.js and when I run them in my terminal (bash on Ubuntu 14.04), nothing happens.
So, it looks like:
#node
#
or
#forever
#forever --help
#forever listall
#
Everything else not node-related runs fine.
There was something wrong with apt-get, so when installing node, it didn't actually install node, but it did put a program in the path that did seemingly nothing.
I uninstalled it with
apt-get purge node
Then, I downloaded the 64-bit linux binary from here: http://nodejs.org/download/
And I extracted it with tar -xvf filename, then I set that directory/bin to the path with:
PATH=$PATH:/directory/to/node/bin
And now it works fine. The forever issue was because the node installed wasn't node at all, but instead a 30kb program of some sort, I don't know.
Here's the information about the program that was installed via apt-get install node:
Package: node
Priority: optional
Section: universe/hamradio
Installed-Size: 38
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Original-Maintainer: Debian Hamradio Maintainers <debian-hams#lists.debian.org>
Architecture: all
Version: 0.3.2-7.4
Depends: ax25-node
Conflicts: nodejs-legacy
Filename: pool/universe/n/node/node_0.3.2-7.4_all.deb
Size: 1284
MD5sum: 7385a0f5916e03d9143459ca4706f0ec
SHA1: bf7aa087db81475636897ff39de344754ce1415b
SHA256: 9756770f771bcc4183cffa622f89e21a585be96bd4de27024b0a7cb167f310ad
Description-en: Amateur Packet Radio Node program (transitional package)
The existing node package has been renamed to ax25-node. This transitional
package exists to ease the upgrade path for existing users.
Description-md5: 1278ed271672fd829c99361f93f468da
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
So, I also found that the correct way to install node with apt-get is apt-get install nodejs.
I had the same issue, and I think it was caused because I naively apt-get installed node first. Doing a
sudo apt-get purge node
Followed by the instructions on the web here (https://github.com/nodesource/distributions):
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
fixed the issue for me. node doesn't exist, but nodejs does and other tools work (like slap) now.
EDIT: On one server I updated, node did exist. Not sure exactly what order things need to happen in, but whatever...
I was having this issue, I found that to solve the issue, I needed to remove the node file within /usr/sbin/node (found with which node) and replace it with a hard link to /usr/bin/nodejs (found with which nodejs)
ln /usr/bin/nodejs /usr/sbin/node
Just run nodejs command on your terminal after installing nodejs package.
It will give you the JavaScript prompt or interpreter.
The problem you are having is that apt-get installed NodeJS under the binary nodejs. Also when you do a npm install forever -g it also expects the binary to be node.
To verify this you can do a
% which forever
lrwxrwxrwx 1 root root 39 Jan 25 21:34 /usr/local/bin/forever -> ../lib/node_modules/forever/bin/forever
to find the location of the forever script.
Then check the node binary it's trying to execute.
% vim /usr/local/lib/node_modules/forever/bin/forever
#!/usr/bin/env node
This /usr/bin/env node needs to be changed to /usr/bin/env nodejs.
But to bypass this problem you should definitely look into using upstart.
http://howtonode.org/deploying-node-upstart-monit

Express.js: No Such file or directory

I installed node with apt-get install nodejs. Then I installed npm with apt-get install npm. Now when I try to run express I get
$ express
/usr/bin/env: node: No such file or directory
How do I resolve this error?
There are two package in Ubuntu that have similar names, node and nodejs.
node does this,
Description-en: Amateur Packet Radio Node program. The node program accepts TCP/IP and packet radio network connections and presents users with an interface that allows them to make gateway connections to remote hosts using a variety of amateur radio protocols.
nodejs does this,
Description-en: Node.js event-based server-side javascript engine Node.js is similar in design to and influenced by systems like Ruby's Event Machine or Python's Twisted. It takes the event model a bit further - it presents the event loop as a language construct instead of as a library. Node.js is bundled with several useful libraries to handle server tasks : System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX, HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
Fedora also follows a similar package naming scheme. Because of this, the binary in nodejs had to be renamed to nodejs from the original node. However, this isn't technically kosher: and most nodejs programs (and libraries installed with npm) assume that the node binary is node. If you want to get around this the easiest way is just symlink the two together. If you take this route, don't install the node package which handles the Amateur Packet Radio stuff.
sudo ln -s /usr/bin/nodejs /usr/local/bin/node
Alternatively, in the case of node, I'd suggest using n and not installing node. Just install npm (which will install node), then remove npm, then tell apt to clean it up. To do this, simply run
sudo apt-get install npm
sudo npm install -g n
sudo n latest
sudo apt-get --purge remove npm
sudo apt-get autoremove
There are other binary distro managers that even work from a shell script like nvm but I personally prefer n. Think of n like an apt for just one thing: the node binary which it installs to /usr/local/bin.
Why are removing npm? We're not. apt-get --purge remove can only ever remove things installed by the package manager. n latest works outside of the package manager. There are two npms if you do this,
version installed by the distro (Debian/Ubuntu) using apt-get.
version installed by n latest.
No point in having the distro's older version. And, even worse, if that version works it can potentially install to a different location and have Debian modifications in it that assume Debian install directories. It's better to use either/or but not both.
you should install nodejs-legacy package which have a link from /usr/bin/node to /usr/bin/nodejs
$ sudo apt-get install nodejs-legacy
In my case it was because in my PATH environment variable, I had "~/progs/node/bin/" and the "~" does not seem to be resolved by env... replacing it with the real full path ("/home/myuser/node/bin") solved my problem.
This solution
export PATH="$HOME/opt/nodejs/bin:$PATH"
resolved this issue for me (it should work assuming the $HOME variable is set properly). It also allows me to avoid hard coding the path to my home directory (for example so I can reuse my .bash_profile with different accounts/servers if I need to)
do this in cmd
sudo apt-get install nodejs-legacy
chmod your folder 700 (optional)
Disclaimer: only for bash command running via deployment tools
Note: In remote server, if you can run node command but via deployment tool like shipit server throws like /usr/bin/env: ‘node’: No such file or directory. Creating symlink will resolve errors.
sudo ln -s $(which node) /usr/bin/node
sudo ln -s $(which npm) /usr/bin/npm
sudo ln -s $(which pm2) /usr/bin/pm2

Resources