Rebolon
Rebolon

Reputation: 1307

[meteor][0.6.*] error with package.js : module is not defined

i try to deploy my meteor application, but it still fail. I use meteor 0.6.1, and its package system. in my root app, i created the following file tree :

packages
    cheerio
        package.js
    iconv-lite
        package.js

here is the content of the package.js :

Package.describe({
    summary: 'Cheerio, an html parser with Jquery like API, but server side'
});

Npm.depends({cheerio: '0.10.8'});

and

Package.describe({
    summary: 'Encoding management'
});

Npm.depends({'iconv-lite': '0.2.7'});

Then i do a meteor deploy appName, and then a meteor logs appName and here is the error :

[Tue Apr 09 2013 13:14:59 GMT+0000 (UTC)] INFO ReferenceError: module is not defined
at app/packages/cheerio/index.js:5:11
at /meteor/containers/72e47bd9-1446-3b0f-126d-113dfb566c3c/bundle/server/server.js:282:7
at Array.forEach (native)
at Function._.each._.forEach (/meteor/dev_bundles/0.3.0/lib/node_modules/underscore/underscore.js:79:11)
at run (/meteor/containers/72e47bd9-1446-3b0f-126d-113dfb566c3c/bundle/server/server.js:227:7)

So i get a problem because the var module is not defined in the js file. I don't know what to do, and any help would be great.

Thanks

Upvotes: 2

Views: 1439

Answers (2)

matb33
matb33

Reputation: 2830

I think you still need at least one js file that you add using api.add_files from package.js, which you have it doing the Npm.require

Upvotes: 0

Rebolon
Rebolon

Reputation: 1307

Based on this website: meteor-npm-integration, i wrote a little subject to explain a little bit more the system of meteor Npm package: tumblr.

Upvotes: 2

Related Questions