nie znaleziono polecenia karmy, gdy karma jest już zainstalowana

Użyłem node.js do zainstalowania karmy. Moja pierwsza próba nie powiodła się, gdy uruchomiłem następujące polecenie na Terminal:

npm install -g karma

To się nie powiodło, więc postanowiłem użyć:

sudo npm install -g karma

Po wprowadzeniu mojego hasła wydawało się, że instaluje się poprawnie. Wklejam część danych wyjściowych instalacji, być może będzie to dla kogoś coś znaczące i będzie miało znaczenie dla mojego pytania. Po wszystkich wiadomościach http npm widzę to:

> [email protected] install /usr/local/share/npm/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
/usr/local/share/npm/bin/karma -> /usr/local/share/npm/lib/node_modules/karma/bin/karma
[email protected] /usr/local/share/npm/lib/node_modules/karma
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

Następnie, gdy próbuję uruchomić następujące polecenie, aby utworzyć plik konfiguracyjny karmy za pomocą tego polecenia:

karma init karma.config.js

to jest wiadomość, która zostanie zwrócona:

-bash: karma: command not found

Próbowałem tego samego polecenia z sudo, ale otrzymuję ten sam wynik.

Czy ktoś ma jakieś pojęcie o tym, co się dzieje? Każda pomoc jest doceniana.

*Aktualizacja! Postanowiłem sprawdzić plik o nazwie: builderror.log znajdujący się w: /usr/local/share/npm/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws

Oto, co pokazuje:

gyp WARN EACCES user "root" does not have permission to access the dev dir "/Users/eperez/.node-gyp/0.10.5"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/share/npm/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.node-gyp"
gyp http GET http://nodejs.org/dist/v0.10.5/node-v0.10.5.tar.gz
gyp http 200 http://nodejs.org/dist/v0.10.5/node-v0.10.5.tar.gz

questionAnswers(9)

yourAnswerToTheQuestion