1

I am developing a meteor app which executes just fine (METEOR@1.2.1) ... However I have witnessed several episodes where after executing a different meteor app which happens to fail like the following one, afterwards when I attempt to run my own app it suddenly starts failing on launch :

Other app :

git clone https://github.com/RocketChat/Rocket.Chat
cd Rocket.Chat


meteor
[[[[[ ~/other_src/Rocket.Chat ]]]]]           

=> Started proxy.                             
=> Started MongoDB.                           
rocketchat:file: updating npm dependencies -- mkdirp, gridfs-stream, gm...
rocketchat:assets: updating npm dependencies -- image-size...
rocketchat:ldap: updating npm dependencies -- ldapjs...
rocketchat:theme: updating npm dependencies -- less, less-plugin-autoprefix...
rocketchat:tutum: updating npm dependencies -- redis...
rocketchat:ui-sidenav: updating npm dependencies -- less, less-plugin-autoprefix...
steffo:meteor-accounts-saml: updating npm dependencies -- xml2js, xml-crypto, xmldom, connect, xmlbuilder, querystring, xml-encryption...
W20151207-17:15:31.344(-5)? (STDERR)          
W20151207-17:15:31.345(-5)? (STDERR) module.js:340
W20151207-17:15:31.346(-5)? (STDERR)     throw err;
W20151207-17:15:31.346(-5)? (STDERR)           ^
W20151207-17:15:31.346(-5)? (STDERR) Error: Cannot find module 'fibers'
W20151207-17:15:31.346(-5)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20151207-17:15:31.348(-5)? (STDERR)     at Function.Module._load (module.js:280:25)
W20151207-17:15:31.348(-5)? (STDERR)     at Module.require (module.js:364:17)
W20151207-17:15:31.348(-5)? (STDERR)     at require (module.js:380:17)
W20151207-17:15:31.349(-5)? (STDERR)     at Object.<anonymous> (/home/scott/other_src/Rocket.Chat/.meteor/local/build/programs/server/boot.js:1:75)
W20151207-17:15:31.349(-5)? (STDERR)     at Module._compile (module.js:456:26)
W20151207-17:15:31.349(-5)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
W20151207-17:15:31.349(-5)? (STDERR)     at Module.load (module.js:356:32)
W20151207-17:15:31.349(-5)? (STDERR)     at Function.Module._load (module.js:312:12)
W20151207-17:15:31.349(-5)? (STDERR)     at Module.require (module.js:364:17)

Here is my app ... these errors only started happening after running above app

meteor 
[[[[[ ~/other_src/github/myapp ]]]]]      

=> Started proxy.                             
=> Started MongoDB.                           
W20151207-17:37:03.985(-5)? (STDERR)          
W20151207-17:37:03.987(-5)? (STDERR) module.js:340
W20151207-17:37:03.987(-5)? (STDERR)     throw err;
W20151207-17:37:03.987(-5)? (STDERR)           ^
W20151207-17:37:03.987(-5)? (STDERR) Error: Cannot find module 'fibers'
W20151207-17:37:03.987(-5)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20151207-17:37:03.987(-5)? (STDERR)     at Function.Module._load (module.js:280:25)
W20151207-17:37:03.988(-5)? (STDERR)     at Module.require (module.js:364:17)
W20151207-17:37:03.988(-5)? (STDERR)     at require (module.js:380:17)
W20151207-17:37:03.988(-5)? (STDERR)     at Object.<anonymous> (/home/scott/other_src/github/myapp/.meteor/local/build/programs/server/boot.js:1:75)
W20151207-17:37:03.988(-5)? (STDERR)     at Module._compile (module.js:456:26)
W20151207-17:37:03.988(-5)? (STDERR)     at Object.Module._extensions..js (module.js:474:10)
W20151207-17:37:03.988(-5)? (STDERR)     at Module.load (module.js:356:32)
W20151207-17:37:03.989(-5)? (STDERR)     at Function.Module._load (module.js:312:12)
W20151207-17:37:03.989(-5)? (STDERR)     at Module.require (module.js:364:17)

I know if I remove my ~/.meteor directory and reinstall meteor

curl https://install.meteor.com/ | sh

my own previously working app suddenly starts working fine again.

ubuntu 15.10

I use no special permissions

I get same issue independent of whether I have nodejs (node-v5.1.0) installed or not (meteor does not rely on external nodejs install)

Is this a known bug in meteor ?
Is this meteor behavior intentional ? Any suggestions on how to avoid this ?

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104
  • Few questions: what operating system do you use to run apps? Above just installing Meteor with sh, do you set up anything else (permissions, etc.)? What version of Node do you use? Maybe [this question](http://stackoverflow.com/questions/15851923/cant-install-update-or-run-meteor-after-update) would be helpful. – rishat Dec 07 '15 at 23:27
  • Can you dump the result of npm version ? When you run meteor, it uses the node js v 0.40, but maybe it's not the case next times... Please remember that Meteor does not support lastest Node versions : https://github.com/meteor/meteor/issues/5452 – Ser Dec 08 '15 at 13:20

2 Answers2

2

When you run one of them, it is updating the packages, as can be seen in your first code sample "updating dependencies".

Meteor uses your .meteor folder to globally store packages in your machine. I'd say there's probably an issue with your fibers package in its version or for you OS version.

Marcelo Schmidt
  • 609
  • 4
  • 15
0

If you run a Meteor app with default settings, it runs on port 3000. Running multiple different Meteor apps on the same port can cause aforementioned problem. To make apps run on different ports, try to use --port parameter, like

$ meteor run --port 4000
rishat
  • 8,206
  • 4
  • 44
  • 69