Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Karma configuration not correct on Windows in Tutorial #5498

Closed
jandrieu opened this issue Dec 20, 2013 · 3 comments
Closed

Karma configuration not correct on Windows in Tutorial #5498

jandrieu opened this issue Dec 20, 2013 · 3 comments
Labels
Milestone

Comments

@jandrieu
Copy link

In http://docs.angularjs.org/tutorial says to install Karma globally using the -g flag:

npm install -g karma

But then in http://docs.angularjs.org/tutorial/step_02 the test script looks for for karma in the local node-modules and fails

In a separate terminal window or tab, go to the angular-phonecat directory
and run ./scripts/test.sh to start the Karma server (the config file necessary
to start the server is located at ./config/karma.conf.js).

Here's the error:

./scripts/test.sh: line 9: ./scripts/../node_modules/karma/bin/karma: No such file or directory

The offending command in the script is

$BASE_DIR/../node_modules/karma/bin/karma start $BASE_DIR/../config/karma.conf.js $*

However, since I installed karma globally, it was an easy fix, changing that line in the script to

karma start $BASE_DIR/../config/karma.conf.js $*

Fwiw, if I had installed karma locally, the script probably would have worked. In any case, it might be an improvement if the karma install and the karma invocation were in sync.

@ghost ghost assigned vojtajina Dec 21, 2013
@vojtajina
Copy link
Contributor

The recomeded way is to install Karma locally. It's even in package.json so we just need to correct the docs.

@jandrieu
Copy link
Author

Cool.

@ricktig
Copy link

ricktig commented Dec 30, 2013

Changing the 'karma start' line by removing the path in the test.sh file worked well.

jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants