0

I am using the following packages :

mrt add bootstrap-3
mrt add iron-router
mrt add angularjs

And when i start my application with mrt, i get the following error..

====

W2042-20:49:50.746(5.5)? (STDERR) /home/aaa/.meteor/tools/0b2f28e18b/lib/node_modules/fibers/future.js:173
W2042-20:49:50.747(5.5)? (STDERR)                       throw(ex);
W2042-20:49:50.747(5.5)? (STDERR)                             ^
W2042-20:49:50.750(5.5)? (STDERR) Error: Cannot find module 'connect'
W2042-20:49:50.750(5.5)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W2042-20:49:50.751(5.5)? (STDERR)     at Function.Module._load (module.js:280:25)
W2042-20:49:50.751(5.5)? (STDERR)     at Module.require (module.js:364:17)
W2042-20:49:50.751(5.5)? (STDERR)     at require (module.js:380:17)
W2042-20:49:50.751(5.5)? (STDERR)     at Object.Npm.require (/home/aaa/dev/APP/.meteor/local/build/programs/server/boot.js:87:18)
W2042-20:49:50.752(5.5)? (STDERR)     at Package (packages/angularjs/server.js:1)
W2042-20:49:50.752(5.5)? (STDERR)     at packages/angularjs.js:67:4
W2042-20:49:50.752(5.5)? (STDERR)     at packages/angularjs.js:74:3
W2042-20:49:50.753(5.5)? (STDERR)     at /home/aaa/dev/MEREBAPU/.meteor/local/build/programs/server/boot.js:154:10
W2042-20:49:50.753(5.5)? (STDERR)     at Array.forEach (native)
=> Exited with code: 8
2
  • 1
    Does npm install connect work for you? Nov 19, 2013 at 0:45
  • yes npm install connectworks,, also tried all versions,, but still getting exception in code
    – shrw
    Nov 20, 2013 at 7:52

1 Answer 1

0

The angularjs package doesn't work with the version of Meteor that you're using.

The angularjs package is using meteor_bootstrap.require to load npm packages, and the new way to do it is Npm.require.

Someone has already filed an issue to the Meteor_angularjs team requesting a fix. Based on their commit history and the messed up state of their tags, I'd guess that the team thinks they've fixed it but something went wrong.

You can work with the Meteor_angularjs team to get a fix released, or you can install angularjs as a private package. To do that:

  1. Clone the Meteor_angularjs repo under your project's packages directory
  2. Modify the Meteor_angularjs code to use the new way to load npm packages, Npm.require and Npm.depends. You might want to look at the commit I mentioned above - maybe you can just copy that code.
  3. Run Meteor. Meteor will detect the Meteor_angularjs project and install the dependencies
2
  • I have filed that issue. I am unable to understand the fix that you suggested. Did you meant to comment the Npm.require line.
    – shrw
    Nov 20, 2013 at 7:54
  • I updated my answer with details on how to make a private package. I don't know the exact lines of code that need to be changed - but maybe the commit I mentioned will have them.
    – jrullmann
    Nov 20, 2013 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.