1

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?

rishat
  • 8,206
  • 4
  • 44
  • 69
  • name: `whoever:whatever` you got `/` maybe this is the issue? :) –  Sep 24 '15 at 10:36
  • Changed to `whoever:whatever` in `name` property of the object passed to `Package.describe`. Still doesn't work. – rishat Sep 24 '15 at 10:53
  • If you do `meteor remove whoever:whatever` what happens? – ZuzEL Sep 24 '15 at 11:18
  • Then I get the message `whoever:whatever: removed dependency`, the app restarts and works normally. I add the package back, and app fails to start again. – rishat Sep 24 '15 at 11:23
  • Is your package in the `packages` folder, in a folder named `whatever`? – Kyll Sep 24 '15 at 11:45
  • The package itself is in `~/dev/whatever`. There's a symlink to this folder from `~/the-app/packages/whatever`. I did this because I read about this in a tutorial. Will check if a symlink is sufficient, though. – rishat Sep 24 '15 at 11:56
  • It may come from there, I'm not sure. Try with another dummy package without the symlink. – Kyll Sep 24 '15 at 12:17
  • Yep, it has been coming from symlinking. Putting a local package into app's `packages` folder by symbolic link doesn't work. It was worth me a day to find out. – rishat Sep 24 '15 at 18:44
  • 2
    Then please specify the symlinking in your question, then you can self-answer describing how you solved the issue. – Kyll Sep 24 '15 at 21:01

3 Answers3

5

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!

lol
  • 3,910
  • 2
  • 37
  • 40
2

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

git submodule update --init --recursive
Community
  • 1
  • 1
Cees Timmerman
  • 17,623
  • 11
  • 91
  • 124
-3

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"
});
Abhay
  • 401
  • 3
  • 12
  • Doesn't work, which should have been expected. Javascript is okay with both single and double quotes without any distinction between them. – rishat Sep 24 '15 at 18:44
  • i know, but i have it with the quotes and it works... so thought that could be the difference.. another difference i see is i have `api.versionsFrom("METEOR@1.0");` for the api.versionsFrom - not sure if that could be a problem... that's the only thing that's different than my package.js – Abhay Sep 24 '15 at 18:58
  • I ran into the same issue today, happens only on Windows. I renamed all package folders to make them Windows compatible (so I replaced colons with dashes), and added name attributes to all package.js files to specify package names with colons. Meteor on Windows fails to solve dependencies, while on Mac everything works as expected. – Sander van den Akker Oct 13 '15 at 09:22
  • Double or single quotes doesn't change anything. http://www.w3schools.com/js/js_strings.asp – Diogo Martins Jul 11 '16 at 23:53