0

After running sudo npm install -g strongloop, the slc command is not found as it should be.

I am running node v0.12.6, npm v3.3.9 on OSX.

Here is the path that npm spits out... incase that helps:

/Users/peter/.node/bin/slc -> /Users/peter/.node/lib/node_modules/strongloop/bin/slc.js
/Users/peter/.node/bin/lb-ng -> /Users/peter/.node/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng
/Users/peter/.node/lib

Here is some info about my node config:

which node: /usr/local/bin/node
which npm: /usr/local/bin/npm
sudo npm config get globalconfig= /Users/peter/.node/etc/npmrc
sudo sh -c 'echo $PATH' = /Users/peter/.node/lib/node_modules/grunt-cli/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
psvj
  • 5,920
  • 7
  • 23
  • 38

1 Answers1

0

There was a problem with my node install.

I fixed it by completely uninstalling node and then reinstalling.

I used the following commands:

brew uninstall node;
brew prune;
rm -f /usr/local/bin/npm;
rm -f /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm;

and then to re-install:

brew install node;
which node #=> /usr/local/bin/node
export NODE_PATH='/usr/local/lib/node_modules' # add to bashrc if not already there

I found these commands here--> how to uninstall and reinstall node on osx

Community
  • 1
  • 1
psvj
  • 5,920
  • 7
  • 23
  • 38