cubabit cubabit - 5 months ago 39
Node.js Question

Typings ambient install not working

I am trying to install some ambient typings, but it is no longer working on my machine. I recently upgraded node so not sure if this caused it. It seems to not be looking in the dt location anymore.

This is the error I get:

~/w/r/c/src (master ⚡☡) typings search moment-timezone
Viewing 1 of 1

moment-timezone dt 1 2016-03-29T22:03:48.000Z

~/w/r/c/src (master ⚡☡) typings i moment-timezone --ambient
typings ERR! message Unable to find "moment-timezone" ("npm") in the registry. Did you want to try searching another source? Also, if you want contribute these typings, please help us:
typings ERR! caused by responded with 404, expected it to equal 200

typings ERR! cwd /Users/pete/work/ruuby/calendar-sync/src
typings ERR! system Darwin 15.3.0
typings ERR! command "/usr/local/Cellar/node/6.1.0/bin/node" "/usr/local/bin/typings" "i" "moment-timezone" "--ambient"
typings ERR! node -v v6.1.0
typings ERR! typings -v 1.0.3

typings ERR! If you need help, you may report this error at:
typings ERR! <>


The answer is here:

TLDR: --ambient has changed to --global

UPDATE From comment below

You need to specify the repository too e.g.:

typings install dt~moment-timezone --global