Patrick
Patrick

Reputation: 13

-bash: npm: command not found in Terminal with Docker MacOS

I setup Docker on MacOS yesterday, and wanted to run npm and getting: -bash: npm: command not found

What do I need to do to get it working okay? Thx.

Upvotes: 0

Views: 1969

Answers (1)

TJ Biddle
TJ Biddle

Reputation: 6494

npm isn't installed on the image you're using.

You can do either of the following:

  1. Install it via traditional means; dependent on the OS you're using.

  2. Use an image, such as the official node image which will come with it pre-installed.

You could use #2 in a way such as:

 docker run node npm -v

Upvotes: 1

Related Questions