bash: slc: command not found
After installing using sudo npm -g install strong-cli, slc cannot be found
Hi @tianshuo, I need more information about your system setup to be able to help you. Please post the output of the following commands:
which node
which npm
npm config get globalconfig
echo $PATH
Also the output when you run in sudo mode:
sudo which node
sudo which npm
sudo npm config get globalconfig
sudo sh -c 'echo $PATH'
Do you have /usr/local/bin on your $PATH?
which node = /usr/local/bin/node which npm = /usr/local/bin/npm npm config get globalconfig=/usr/local/etc/npmrc echo $PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/deployd/bin
sudo which node = /usr/local/bin/node sudo which npm = /usr/local/bin/npm sudo npm config get globalconfig=/usr/local/etc/npmrc sudo sh -c 'echo $PATH'= /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/deployd/bin
On Mon, May 26, 2014 at 3:30 PM, Miroslav Bajtoš [email protected]:
Hi @tianshuo https://github.com/tianshuo, I need more information about your system setup to be able to help you. Please post the output of the following commands:
which node which npm npm config get globalconfig echo $PATH
— Reply to this email directly or view it on GitHubhttps://github.com/strongloop/loopback/issues/281#issuecomment-44164013 .
胡天硕 TiansHUo Blog: http://tianshuohu.diandian.com
Thanks. The environment is configured in the usual way, it should not be the source of the problem.
When you run npm -g install strong-cli, it should create these files for you:
# all sources of strong-cli
/usr/local/lib/node_modules/strong-cli/
# symlink to enable `slc` command
/usr/local/bin/slc -> ../lib/node_modules/strong-cli/bin/slc
Please check the files were created on your machine and that slc permissions have executable flag turned on of all users.
You can also try to re-install the package:
sudo npm uninstall -g strong-cli
sudo npm install -g strong-cli
I'm closing as no further activity shows up. Please reopen if it's still an issue for you.
I found this problem in couple Ubuntu 14 servers using node.js 4.1.2 By default somehow slc is not created or not added to PATH. Solved this problem by adding symlink:
code
sudo ln -s /usr/lib/node_modules/strongloop/bin/slc.js /usr/bin/slc
All, please note that strongloop-specific tooling is no longer being maintained and that the lb cli tool provided by the loopback-cli project now "supersedes" strongloop's "older slc tool."
I know this post is old but this solution did not fix my issue. What i did to resolve this issue is to make sure you are running power shell or Git Bash as an administrator. If you are on Ubuntu make sure you run SUDO