rishat
rishat

Reputation: 8376

Error: unknown package in top-level dependencies in Meteor app

I'm making a small Meteor package. It employs two other packages that are explicitly listed in its package.js. For test purposes, I add this package from local system (it's not published on Atmosphere). And I keep getting error messages after I run the app:

=> Started proxy.                             
=> Started MongoDB.                           
=> Errors prevented startup:                  

   While selecting package versions:
   error: unknown package in top-level dependencies: whoever:whatever

I even added required packages explicitly to the app but it didn't help.

The package.js:

Package.describe({
    name: 'whoever:whatever',
    version: '0.0.1',
    summary: 'Whatever the summary is',
    git: 'https://github.com/whoever/whatever',
    documentation: 'README.md'
});

Package.onUse(function(api) {
    api.versionsFrom('1.1.0.3');
    api.use('http');
    api.use('jparker:crypto-sha1', 'server');
    api.use('simple:reactive-method', 'client');
    api.addFiles('for-a-server.js', 'server');
    api.addFiles([
        'for-a-client.js',
        'for-a-client.html'
    ], 'client');
});

What am I doing wrong? What should I look for next?

Upvotes: 1

Views: 5164

Answers (3)

Cees Timmerman
Cees Timmerman

Reputation: 19644

Make sure to both init and update your submodules. This should work:

git submodule update --init --recursive

Upvotes: 2

lol
lol

Reputation: 4200

As was mentioned in your comments, it was due to a problem with symlinking. However, for googlers who come by developing their own meteor packages and also getting this message -- they need to check their env vars have $PACKAGE_DIRS defined in the terminal calling meteor to start their app.

I didn't and this caused the same problem!

Upvotes: 5

Abhay
Abhay

Reputation: 397

Can you please try and replace the single quotes with double quotes and try... something like below. Please type the quotes.

Package.describe({
    name: "whoever:whatever",
    version: "0.0.1",
    summary: "Whatever the summary is",
    git: "https://github.com/whoever/whatever",
    documentation: "README.md"
});

Upvotes: -3

Related Questions