Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I deploy node modules in a Meteor app on meteor.com?
    text
    copied!<p>I have an application that uses the node twit module that is available via </p> <pre><code>npm install twit </code></pre> <p>I deployed the node module locally from .meteor/local/build/server/</p> <p>So, it is visible at .meteor/local/build/server/node_modules/twit</p> <p>I tried installing it at project root but the project did not find the module. Which led me to the above solution which works.</p> <p>My application now runs fine locally. I am able to run and do everything and can interact with Twitter from my Meteor server side or client side depending on what I want to do. No crashes.</p> <p>When I deploy to meteor.com through the command</p> <pre><code>meteor deploy [appname] --password </code></pre> <p>The application deploys successfully.</p> <p>When I attempt to access the (app at anonistream.meteor.com)[anonistream.meteor.com] from a browser it fails and the logs contain this error.</p> <pre><code>[Mon May 07 2012 01:59:53 GMT+0000 (UTC)] WARNING node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: Cannot find module 'twit' at Function._resolveFilename (module.js:332:11) at Function._load (module.js:279:25) at Module.require (module.js:354:17) at require (module.js:370:17) at app/server/server.js:2:12 at /meteor/containers/84162a7c-24e8-bf26-6fd8-e4ec13b2a935/bundle/server/server.js:111:21 at Array.forEach (native) at Function.&lt;anonymous&gt; (/meteor/containers/84162a7c-24e8-bf26-6fd8- e4ec13b2a935/bundle/server/underscore.js:76:11) at /meteor/containers/84162a7c-24e8-bf26-6fd8-e4ec13b2a935/bundle/server/server.js:97:7 [Mon May 07 2012 01:59:53 GMT+0000 (UTC)] INFO STATUS running -&gt; waiting [Mon May 07 2012 01:59:53 GMT+0000 (UTC)] ERROR Application crashed with code: 1 [Mon May 07 2012 02:29:55 GMT+0000 (UTC)] INFO HIT / 24.94.158.145 [Mon May 07 2012 02:29:59 GMT+0000 (UTC)] INFO HIT /favicon.ico 24.94.158.145 [Mon May 07 2012 02:30:46 GMT+0000 (UTC)] INFO HIT / 24.94.158.145 [Mon May 07 2012 02:30:50 GMT+0000 (UTC)] INFO HIT /favicon.ico 24.94.158.145 </code></pre> <p>Does anyone have any suggestions on how this might be accomplished?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload