jamesknelson / meteor-yaml

Meteor smart package for YAML parsing/generation
MIT License
2 stars 5 forks source link

Installing package crashes app #2

Open jenschelkopf opened 11 years ago

jenschelkopf commented 11 years ago

I'm really new to meteor, so I might be doing something wrong here.

I ran: mrt add yaml

And then started the project with: mrt

The app crashes with this message:

=> Errors prevented startup:
Exception while bundling application:
Error: Can't find npm module 'yamljs'. Did you forget to call 'Npm.depends'?
    at Object.self.npmFacade.require (/home/shido/.meteor/tools/cc18dfef9e/tools/packages.js:136:17)
    at /home/shido/code/voysee/web/voysee/packages/yaml/package.js:11:12
    at _.extend.initFromPackageDir (/home/shido/.meteor/tools/cc18dfef9e/tools/packages.js:175:5)
    at _.extend.initFromLocalPackages (/home/shido/.meteor/tools/cc18dfef9e/tools/packages.js:188:12)
    at Object._.extend.get (/home/shido/.meteor/tools/cc18dfef9e/tools/packages.js:350:17)
    at self.api.use (/home/shido/.meteor/tools/cc18dfef9e/tools/bundler.js:111:28)
    at Array.forEach (native)
    at Function._.each._.forEach (/home/shido/.meteor/tools/cc18dfef9e/lib/node_modules/underscore/underscore.js:78:11)
    at Object.self.api.use (/home/shido/.meteor/tools/cc18dfef9e/tools/bundler.js:110:9)
    at _.extend.init_from_app_dir [as on_use_handler] (/home/shido/.meteor/tools/cc18dfef9e/tools/packages.js:238:11)
    at _.extend.use (/home/shido/.meteor/tools/cc18dfef9e/tools/bundler.js:464:11)
    at Object.exports.bundle (/home/shido/.meteor/tools/cc18dfef9e/tools/bundler.js:873:12)
    at /home/shido/.meteor/tools/cc18dfef9e/tools/run.js:697:26
    at exports.inFiber (/home/shido/.meteor/tools/cc18dfef9e/tools/fiber-helpers.js:24:12)
=> Your application is crashing. Waiting for file change.

I opened yaml/package.js, and I can see you're calling Npm.depends prior to calling Npm.require('yamljs'). So I'm sure I'm just doing something wrong. Could you help me?

jenschelkopf commented 11 years ago

I was able to fix the problem by commenting out this line of code:

//yaml = Npm.require('yamljs');

And everything worked. I'm really new to meteor, so I don't know if that's the best solution, but it does appear to be working.