Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 2 issue: typings: command not found

So this might come off as a really basic question but it has been bugging me for days now and haven't actually found a solution.

I'm installing typings from the command line with npm and it appears to run well but then I type any typing command and it says that the command doesn't exist!

It goes something like:

    Kevyns-MacBook-Pro:~ kevynquiros$ sudo npm install typings --global
Password:
/Users/kevynquiros/npm/bin/typings -> /Users/kevynquiros/npm/lib/node_modules/typings/dist/bin.js
[email protected] /Users/kevynquiros/npm/lib/node_modules/typings
├── [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], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

And then this is what happens:

Kevyns-MacBook-Pro:~ kevynquiros$ typings search tape
-bash: typings: command not found

Please help!

like image 837
Kevyn Quiros Avatar asked Jun 01 '16 23:06

Kevyn Quiros


2 Answers

Try to use npm install typings -g

like image 69
Liad Livnat Avatar answered Oct 19 '22 19:10

Liad Livnat


As of the cmd output in your question, the typings package is installed in /Users/kevynquiros/npm/bin/typings. You need to add that folder to your PATH.

One way to do it is:

  • Create "or edit" the file /Users/kevynquiros/.bash_profile
  • In that file, add a line:

    export PATH=${PATH}:/Users/kevynquiros/npm/bin/

  • close and re-open terminal and it should work.

like image 7
Abdulrahman Alsoghayer Avatar answered Oct 19 '22 17:10

Abdulrahman Alsoghayer