{"id":3915,"date":"2016-04-27T01:08:46","date_gmt":"2016-04-27T01:08:46","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=3915"},"modified":"2016-04-27T01:08:46","modified_gmt":"2016-04-27T01:08:46","slug":"fixing-typings-error","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/fixing-typings-error\/","title":{"rendered":"Fixing Typings error: Unable to find &#8220;react&#8221; (&#8220;npm&#8221;) in the registry"},"content":{"rendered":"<p>When I first tried to use typings, I got a lot of errors like this:<\/p>\n<pre>\ntypings ERR! message Unable to find \"react\" (\"npm\") in the registry. Did you want to try searching another source?Also, if you want contribute these typings, please help us: https:\/\/github.com\/typings\/registry\ntypings ERR! caused by https:\/\/api.typings.org\/entries\/npm\/react\/versions\/latest responded with 404, expected it to equal 200\n\ntypings ERR! cwd \/Users\/gary\/youtube\ntypings ERR! system Darwin 14.0.0\ntypings ERR! command \"\/usr\/local\/bin\/node\" \"\/usr\/local\/bin\/typings\" \"install\" \"react\" \"--save\"\ntypings ERR! node -v v6.0.0\ntypings ERR! typings -v 0.8.1\n\ntypings ERR! If you need help, you may report this error at:\ntypings ERR!   <https:\/\/github.com\/typings\/typings\/issues>\n<\/pre>\n<p>This means that while the type bindings you&#8217;re trying to download may not exist, they do not exist in the default source location, which apparently is npm.<\/p>\n<p>To fix this, you need to re-run the search command, like so, to find the correct location:<\/p>\n<pre lang=\"bash\">\ntypings search --name react\nViewing 1 of 1\n\nNAME  SOURCE HOMEPAGE                         DESCRIPTION UPDATED                 \nreact dt     http:\/\/facebook.github.io\/react\/             2016-04-23T06:59:14.000Z\n<\/pre>\n<p>In this case the source is &#8220;dt&#8221;, so you need to run this command (note the apostrophes &#8211; needed for bash):<\/p>\n<pre lang=\"bash\">\ntypings install 'dt!react' --save\n<\/pre>\n<p>Which will give you this output, showing that it works:<\/p>\n<pre>\nreact\n\u2514\u2500\u2500 (No dependencies)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to install Typescript type bindings from non-npm sources<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[9],"tags":[302,387,388,393,414,557,558],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3915"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=3915"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/3915\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=3915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=3915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=3915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}