Jasmine: command not found



I installed jasmine globally, but cannot get it to run. I run npm view jasmine version and it shows I got the latest version 3.1.0.

When I go to the the exercise directory and run jasmine helloWorld.spec.js, I get the following output: bash: jasmine: command not found.

Any idea what is going wrong?




If you run npm install jasmine or If jasmine is a dependency / devDependcy in your package.json and you have run npm install, jasmine is installed into the local node_modules folder and then you can run jasmine like this node_modules/.bin/jasmine.

if you install it globally npm install jasmine -g then can run it like this jasmine.

Yarn should work exactly the same.