Redirecting to http://loopback.io/doc/en/lb2/Installation-troubleshooting.html ...
Make sure you have the latest version of Node
Ensure you have the latest stable version of Node as stated on http://nodejs.org/.
Uninstall old versions
If you installed StrongLoop software prior to Aug. 6, 2014, you must uninstall and then re-install the software. See Updating to the latest version.
Make sure you have sufficient file privileges
To install Node and StrongLoop , you need permissions to write to directories:
If you see errors such as:
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:
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.
If you have to use
sudo, use the following command:
Cygwin not supported
LoopBack does not support Cygwin (Windows bash shell emulator), because Node does not support it for interactive prompts. Use Windows command shell instead.
If you want to use LoopBack and the slc loopback command-line tool on Windows, but encounter installation errors running
npm install -g strongloop, use the following workaround:
Then, instead of
slc loopback, use
yo loopback instead, including for all the generators, for example
yo loopback:model. For more information on Yeoman, see http://yeoman.io/.
Xcode license issues
If you see errors such as:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Then you recently upgraded or installed Xcode and haven't agreed to the license yet.
Enter the following command to validate your Xcode license, then reinstall StrongLoop:
Errors with npm
Peer dependency errors
If you encounter
peerDependency conflicts with modules that are already installed globally either through
npm install -g or
npm link, you may have conflicting versions of modules installed globally. Inspect your global Node module directory (typically
/usr/local/lib/node_modules), remove the conflicting modules manually, then re-install.
A firewall may block npm installation because it blocks
git:// URLs. You can configure Git to use HTTPS instead as follows:
See Git is blocked, how to install npm modules (StackOverflow) for more details.
Alternatives to public npm registry
Occasionally, the npm package manager will be down or otherwise generate error messages during installation. When this occurs, you can wait for the npm problem to be resolved, or:
- Use an alternative registry
- Install modules from GitHub
Use alternative registry
In addition to the official npm registry at http://registry.npmjs.org, there are several alternative npm registries:
- http://registry.npmjs.org.au (Australia)
- https://registry.nodejitsu.com (US East)
- http://registry.cnpmjs.org (China)
The unofficial registries are not always updated in realtime but may work when the official npm registry is down or overloaded. You can use npmrc to manage different configurations.
One you have installed
slc, you can do more sophisticated registry management using the
slc registry command. See Using multiple package registries for more information.
As a last resort, you can search the name of your package on GitHub and either clone with
git clone or download the tarball, unzip and copy it in your node_modules folder.
Errors on Ubuntu
You may see the following errors when installing on Ubuntu:
To fix this, enter the following command: