Loopback: slc command not found in terminal

Created on 12 Sep 2016  ·  12Comments  ·  Source: strongloop/loopback

Hello,

I recently installed loopback for a project and tried to follow the instructions on the docs but did not have any luck running "slc loopback".

My osX path is : /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

My node path is: /usr/local/bin/node
My npm path is : /usr/local/bin/npm

and the output from the npm ls -g --depth=0 command is:

/Users/joelcarter/.npm-packages/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Yet I keep getting a -bash: slc: command not found error.

Any help would be greatly appreciated.

Thanks

triaging

Most helpful comment

@jannyHou I assume you mean to close this as fixed? Closing for you. ;)

All 12 comments

@carter3689 Are you able to find slc in /usr/local/bin/?
And BTW, could you copy me the docs that you followed to install it? Thanks.

@jannyHou Hey thanks for responding. No, unfortunately I didn't.

The docs I used were http://loopback.io/getting-started/ and https://docs.strongloop.com/display/SL/Installing+StrongLoop

@carter3689 ideally slc should be installed with strongloop together if you run npm install -g strongloop
Could you give me the node and npm version you are using?

And I suggest you reinstall node using instruction http://blog.teamtreehouse.com/install-node-js-npm-mac

If it still doesn't work please update here. Good luck!

@jannyHou The Node version I am using is v4.5.0
The Npm version I am using is 2.15.9

I'll try the instruction you provided and update on the status soon. Thanks

@carter3689 Sounds good. If you still don't have slc in /usr/local/bin/ after reinstall node & strongloop globally, please try to paste your strongloop installation log here, it might give us some clue about why slc installation fails.

BTW, my npm modules are installed in /usr/local/lib by default, so maybe try don't use a custom npm path.

dc60server:loopback-sandbox jannyhou$ npm ls -g --depth=0
/usr/local/lib
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] -> /Users/jannyhou/lb/lb-project/loopback
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

And please make sure you followed installation on macOS, like give folders permission, etc...:
https://docs.strongloop.com/display/SL/Installing+on+MacOS

I reinstalled Node using homebrew but I received an error saying Warning: node-6.5.0 already installed, it's just not linked Also, regarding the custom npm path, is there a way to reset the path of npm?

I've also followed the installation docs for folder permissions multiple times with no luck.

Interesting, seems your node and npm are not working well..... I am not a installation expert TBH lol,
try what google says?
https://www.google.ca/?client=safari#q=uninstall+node+mac&gfe_rd=cr

uninstall node then reinstall it.

Hey Good news!! It works!!
screen shot 2016-09-12 at 3 04 41 pm

I found some helpful links that helped reset my npm path that may be of help to others.
http://stackoverflow.com/questions/20934343/how-to-restore-reset-npm-configuration-to-default-values

Then I reinstalled loopback, after following the file permission tutorial again and like magic...IT WORKS!! :) 👍

@carter3689 Good Job! Thank you and Cheers 👍

Then I am closing this issue since it's fixed. Good to know that NPM path is critical when installing strongloop!

My guess is maybe your custom path didn't have enough permission (you only set permission for default one but actually modules are not installed there)?

@jannyHou I assume you mean to close this as fixed? Closing for you. ;)

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rkmax picture rkmax  ·  3Comments

bryannaegele picture bryannaegele  ·  4Comments

ian-lewis-cs picture ian-lewis-cs  ·  4Comments

cajoy picture cajoy  ·  4Comments

ImanMh picture ImanMh  ·  4Comments