Antarr Byrd
Antarr Byrd

Reputation: 26091

unable use any installed npm packages

I'm trying to use node on my fedora 21 installation. However whenever I install a package via npm I am not able to to call that package such as gulp.

npm install -g gulp

then : gulp run

error:

zsh: command not found: gulp

Upvotes: 2

Views: 136

Answers (2)

Ben Rondeau
Ben Rondeau

Reputation: 3053

You need to point your global $PATH variable to the location of node. Otherwise, it will return that error.

Open your .zshrc file and ensure you see something like PATH=/usr/bin/node:$PATH (ensuring your directory is the proper one for node). You can find that directory location with the command npm -g bin.

If that doesn't work, comment below. Thanks

Upvotes: 2

Trott
Trott

Reputation: 70075

The directory where npm installed gulp is not in your path. To find out where it was installed, run npm -g bin and make sure the directory is in your path. Alternatively, execute gulp as $(npm -g bin)/gulp.

Upvotes: 2

Related Questions