GRPC + Google Cloud: Cannot find module grpc_node.node

I have been running a small service on Google Compute Engine (Ubuntu) that requires the google-cloud npm module but I kept hitting an error with grpc_node.node not being found.
Error: Cannot find module ‘/home/paul_kinlan/web-push-rocks/frontend/node_modules/google-cloud/node_modules/grpc/src/node/extens ion_binary/grpc_node.node’ at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Function._load (/usr/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (/home/paul_kinlan/web-push-rocks/frontend/node_modules/google-cloud/node_modules/grpc/src/node/src/gr pc_extension.js:38:15) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) It was incredibly frustrating as I have not seen any recognition of the issues that many people are facing.


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan

<p>I have been running a small service on Google Compute Engine (Ubuntu) that requires the <code>google-cloud</code> npm module but I kept hitting an error with <code>grpc_node.node</code> not being found.</p> <div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">Error: Cannot find module <span style="color:#e6db74">'/home/paul_kinlan/web-push-rocks/frontend/node_modules/google-cloud/node_modules/grpc/src/node/extens </span><span style="color:#e6db74">ion_binary/grpc_node.node'</span> at Function.Module._resolveFilename <span style="color:#f92672">(</span>module.js:469:15<span style="color:#f92672">)</span> at Function.Module._load <span style="color:#f92672">(</span>module.js:417:25<span style="color:#f92672">)</span> at Function._load <span style="color:#f92672">(</span>/usr/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21<span style="color:#f92672">)</span> at Module.require <span style="color:#f92672">(</span>module.js:497:17<span style="color:#f92672">)</span> at require <span style="color:#f92672">(</span>internal/module.js:20:19<span style="color:#f92672">)</span> at Object.<anonymous> <span style="color:#f92672">(</span>/home/paul_kinlan/web-push-rocks/frontend/node_modules/google-cloud/node_modules/grpc/src/node/src/gr pc_extension.js:38:15<span style="color:#f92672">)</span> at Module._compile <span style="color:#f92672">(</span>module.js:570:32<span style="color:#f92672">)</span> at Object.Module._extensions..js <span style="color:#f92672">(</span>module.js:579:10<span style="color:#f92672">)</span> at Module.load <span style="color:#f92672">(</span>module.js:487:32<span style="color:#f92672">)</span> at tryModuleLoad <span style="color:#f92672">(</span>module.js:446:12<span style="color:#f92672">)</span> </code></pre></div><p>It was incredibly frustrating as I have not seen any recognition of the issues that many people are facing.</p> <p>The solution that I found (well <a href="https://dassur.ma/">Surma</a> on our team found) was to force a rebuild of the module from source as follows:</p> <div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">npm install npm rebuild --build-from-source google-cloud </code></pre></div><p>Stupid node. Stupid Cloud platform. :)</p>


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan


Print Share Comment Cite Upload Translate Updates
APA

Paul Kinlan | Sciencx (2016-11-24T00:00:00+00:00) GRPC + Google Cloud: Cannot find module grpc_node.node. Retrieved from https://www.scien.cx/2016/11/24/grpc-google-cloud-cannot-find-module-grpc_node-node/

MLA
" » GRPC + Google Cloud: Cannot find module grpc_node.node." Paul Kinlan | Sciencx - Thursday November 24, 2016, https://www.scien.cx/2016/11/24/grpc-google-cloud-cannot-find-module-grpc_node-node/
HARVARD
Paul Kinlan | Sciencx Thursday November 24, 2016 » GRPC + Google Cloud: Cannot find module grpc_node.node., viewed ,<https://www.scien.cx/2016/11/24/grpc-google-cloud-cannot-find-module-grpc_node-node/>
VANCOUVER
Paul Kinlan | Sciencx - » GRPC + Google Cloud: Cannot find module grpc_node.node. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2016/11/24/grpc-google-cloud-cannot-find-module-grpc_node-node/
CHICAGO
" » GRPC + Google Cloud: Cannot find module grpc_node.node." Paul Kinlan | Sciencx - Accessed . https://www.scien.cx/2016/11/24/grpc-google-cloud-cannot-find-module-grpc_node-node/
IEEE
" » GRPC + Google Cloud: Cannot find module grpc_node.node." Paul Kinlan | Sciencx [Online]. Available: https://www.scien.cx/2016/11/24/grpc-google-cloud-cannot-find-module-grpc_node-node/. [Accessed: ]
rf:citation
» GRPC + Google Cloud: Cannot find module grpc_node.node | Paul Kinlan | Sciencx | https://www.scien.cx/2016/11/24/grpc-google-cloud-cannot-find-module-grpc_node-node/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.