How can I make the slc command work on Ubuntu?

I installed Strongloop using npm install -g strongloop on my Ubuntu 14.04 server. The slc command slc not work. It says:

The program 'slc' is currently not installed. You can install it by typing: sudo apt-get install heimdal-multidev

How do I get Strongloop to run CLI instead of looking for this package? I have added this to my PATH and it still doesn't work. Any ideas?

Other Strongloop commands, such as sl-build work and strongloop , are listed in npm list -g .

+6
source share
5 answers

It seems that the Node installation that comes with the Digital Ocean Droplet option installs in a different place, not in $PATH . I am sure it was a problem. In any case, I fixed it by deploying the server without Node preinstalled and following this guide . Just use npm install -g strongloop instead of strong-cli because the latter is deprecated.

+1
source

Ubuntu 14 with node.js 4.1.2

By default, no slc is created or added to the PATH. I solved this problem by adding a symlink:

 sudo ln -s /usr/lib/node_modules/strongloop/bin/slc.js /usr/bin/slc 
+7
source

A soft link should be created in / usr / local / bin called slc , which will point to the strongloop binary.

Check if the following exists.

 /usr/local/lib/node_modules/strongloop/bin/slc 

If not, strongloop will not install successfully, otherwise check for the presence of softlink slc in /usr/local/bin/ .

 /usr/local/bin/slc -> /usr/local/lib/node_modules/strongloop/bin/slc 

If so, then /usr/local/bin must be added to $PATH , otherwise create a softlink and make sure that /usr/local/bin in $PATH .

+4
source

Ubuntu 14.04 with node.js 4.4.2 (LTS):

The strongloop installation was completed without any errors, but slc was not added to the PATH. I solved this problem by adding a symlink:

  sudo ln -s /usr/local/lib/node_modules/strongloop/bin/slc.js /usr/bin/slc 
0
source

In fact, I'm not sure that my case matches yours, but I want to share my experience. I received the same message.

I realized that I used to use the global package prefix. Then I checked the prefix with the following command.

$ npm config get prefix /home/myUser/.node_modules_global

Then I added the path to the PATH variable (but the .profile, .bash_profile files would be better) in the active command window and the problem will be solved.

0
source

Source: https://habr.com/ru/post/984162/


All Articles