javascriptcssmeteortelescope

Meteor not detecting package


Following this tutorial, I created a simple package.js referring to a css file qocustom.css kept in the same directory qopackage

So inside the qopackage folder is the package.js and the qocustom.css files.

I have tried:

  1. moving this folder to /root/.meteor/packages/ (quest is the project name)
  2. moving this folder to /root/quest/.meteor/local/build/programs/web.browser/packages/ (quest is the project name)

And with both attempts,

Trying:

sudo meteor add qopackage

Returns:

=> Errors while parsing arguments:

While adding package qopackage:
error: no such package

Can someone please help me out with this?

---- EDIT ----

Here's the content of the two files:

Package.js:

Package.describe({
  summary: 'QuestOrganizer custom package',
  version: '1.0.0',
  name: 'qo-custom'
});

Package.onUse(function (api) {  
  api.addFiles('qocustom.css', 'client');
});

qocustom.css:

hero .copy {
    top: 3%
}
.btn {
    border radius:0px;
}

Solution

  • Packages need to go into PROJECT_DIRECTORY/packages/packagename. So in your case, try moving these files into /root/quest/packages/qopackage. Afterwards you should be able to add them to your project.

    As an aside, and you probably know that: running your project as root/sudo is probably not a good idea in terms of security.

    UPDATE:

    It's easier though to ask meteor to setup the package structure for you:

    meteor create --package qopackage