Warning: The StrongLoop
slc tool is still available, however it is not
recommended for LoopBack development, as it will be deprecated in the future. To upgrade an
existing installation to the latest version, see Updating to the latest version.
Important: These instructions are for a development installation, not production.
Install compiler tools
See Installing compiler tools for more information.
Tip: Many Linux distributions come with the necessary tools. See Installing compiler tools for detailed requirements.
Warning: Changing privileges like this is appropriate only on your local development system. Never do this on a server system.
To install Node and StrongLoop , you need permissions to write to directories:
If you see errors such as:
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/strongloop' ... npm ERR! Please try running this command again as root/Administrator ...
Then you don’t have the required rights to create files or directories. Either change the rights for the specified directories, or run the command using
sudo. In general, it’s better to fix the directory rights as follows:
$ sudo chown -R $USER /usr/local
This command makes your user account the owner of the
/usr/local directory. Then you won’t ever have to use
sudo to install Node or install packages globally with
npm. For more information, see How to Node.
DO NOT use the above
chown command on the
/usr/bin directory. Doing so can severely misconfigure your system.
If you have to use
sudo, use the following command:
$ sudo npm install -g --unsafe-perm install strongloop
If you haven’t already installed Node, download and install Node.js. For best results, use the latest LTS (long-term support) release of Node.js.
Warning: LoopBack does not support Node.js versions prior to 4.x.
Follow these steps:
- Open a terminal window
Enter this command:
$ npm install -g strongloop
If you didn’t set your file and directory privileges as instructed above, you may need to use this command (not recommended):
$ sudo npm install -g strongloop
Note: During installation, you may see a number of errors from
node-gypif you don’t have compiler tools installed. You can ignore the errors for now.
If you run into any problems, see Installation troubleshooting.
Errors on Ubuntu
You may see the following errors when installing on Ubuntu:
email@example.com install /usr/local/lib/node_modules/strong-pm/node_modules/minkelite/node_modules/sqlite3 node-pre-gyp install --fallback-to-build /usr/bin/env: node: No such file or directory npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian npm ERR! weird error 127 npm ERR! not ok code 0
To fix this, enter the following command:
$ update-alternatives --install /usr/bin/node node /usr/bin/nodejs 99