{"id":3046,"date":"2014-03-15T02:04:10","date_gmt":"2014-03-15T02:04:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/15\/how-to-host-the-google-libphonenumber-locally-collection-of-common-programming-errors\/"},"modified":"2014-03-15T02:04:10","modified_gmt":"2014-03-15T02:04:10","slug":"how-to-host-the-google-libphonenumber-locally-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/15\/how-to-host-the-google-libphonenumber-locally-collection-of-common-programming-errors\/","title":{"rendered":"How to host the google libphonenumber locally?-Collection of common programming errors"},"content":{"rendered":"<p>During development on my localhost, I am trying to self host the libphonenumber library. I am trying with the following:<\/p>\n<pre><code>\ngoog.require('goog.proto2.Message');\n\n\n\n\n\n<\/code><\/pre>\n<p>This is working, but I still have a dependency to an externally hosted component: the closure library. I have tried using closure-lite, which is (apparently, I am new here) a quite complete version of the closure library, available for self-hosting. I have tried doing the following:<\/p>\n<pre><code>\ngoog.require('goog.proto2.Message');\n\n\n\n\n\n<\/code><\/pre>\n<p>But the <code>goog.proto2.Message<\/code> is not available. I am getting the following errors:<\/p>\n<pre><code>Uncaught TypeError: Cannot read property 'Message' of undefined\n<\/code><\/pre>\n<p>The error comes from the <code>phonemetadata.pb.js<\/code> script:<\/p>\n<pre><code>goog.inherits(i18n.phonenumbers.NumberFormat, goog.proto2.Message);\n<\/code><\/pre>\n<p>What can I do to completely self-host the <code>libphonenumber<\/code>?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During development on my localhost, I am trying to self host the libphonenumber library. I am trying with the following: goog.require(&#8216;goog.proto2.Message&#8217;); This is working, but I still have a dependency to an externally hosted component: the closure library. I have tried using closure-lite, which is (apparently, I am new here) a quite complete version of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3046","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3046"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3046\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}