Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
792 views
in Technique[技术] by (71.8m points)

node.js - npm package (PeerJS) installed but not recognized in command line

I'm trying to use PeerJS in the command line after I've installed it using

npm i -g peerjs

and I can confirm it's installed globally as it shows when I run

npm list -g --depth 0

When I try to run peerjs in the command line, it throws a CommandNotFoundException.

I've tried adding these to my user PATH variable:

PATH

I've also tried uninstalling and reinstalling PeerJS, as well as running the NodeJS Command Line app which is meant to set up the environment.

Any help on getting this command working would be greatly appreciated.

Thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You probably meant to install the peer package, which is the PeerJS server. That is the one that provides the peerjs command. The peerjs package contains the API library.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...