meteorhacks / npm

Complete NPM integration for Meteor
http://meteorhacks.com/complete-npm-integration-for-meteor.html
MIT License
508 stars 43 forks source link

(Meteor 1.1.0.2) Meteor.npmRequire and Npm.require are undefined. #83

Open mrunderhill89 opened 9 years ago

mrunderhill89 commented 9 years ago

I added meteorhacks:npm to my project, but I can't get either Meteor.npmRequire or Npm.require to work. Both functions come up undefined. The console will say either "Meteor.npmRequire is not a function" (and logging it reveals that it's undefined), or "Npm is undefined."

Here's my code:

Meteor.startup(function(){
    //neither of these lines work.
    var Backbone = Meteor.npmRequire("backbone");
    //var Backbone = Npm.require("backbone");
});

packages.json

{
    "react-three": "0.6.0",
    "backbone": "1.1.2"
}

Meteor packages

meteor-platform
autopublish
insecure
davidcittadini:three
mquandalle:bower
meteorhacks:npm
npm-container
arunoda commented 9 years ago

Both these apis are only available on the server side. On 2015 අප්‍රේල් 24, සිකු at පෙ.ව. 7.36 mrunderhill89 < notifications@github.com> wrote:

I added meteorhacks:npm to my project, but I can't get either Meteor.npmRequire or Npm.require to work. Both functions come up undefined.

Here's my code:

Meteor.startup(function(){ var Backbone = Meteor.npmRequire("backbone"); });

packages.json

{ "react-three": "0.6.0", "backbone": "1.1.2" }

Meteor packages

meteor-platform autopublish insecure davidcittadini:three mquandalle:bower meteorhacks:npm npm-container

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/npm/issues/83.

mrunderhill89 commented 9 years ago

That would explain it. Thanks!

arunoda commented 9 years ago

Shall we close this issue then :) On 2015 අප්‍රේල් 24, සිකු at පෙ.ව. 7.54 mrunderhill89 < notifications@github.com> wrote:

That would explain it. Thanks!

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/npm/issues/83#issuecomment-95777896.