meteorjs packages not visible - meteor

I'm new to meteor. I just created an app and install bootstrap and iron-router via mrt.
When I look at the file structure, I can see iron-router but not bootstrap (I don't see all the other pre-installed packages either).
When I run the app, everything works fine though. But I need to see these packages to understand what's happening.
Thanks,

There are two types of packages in Meteor projects. 'official' packages and unsupported community packages (from atmospherejs.com)
The mrt package manager wasn't built by the Meteor Core development team (as of v0.8.1). The packages from atmosphere will be installed in /packages
The other packages which are officially part of Meteor are not visible here but they are used from ~/.meteor/packages. Alternatively you can browse the source of them here: https://github.com/meteor/meteor/tree/devel/packages.
Eventually meteorite and meteor will be merged. Even though Meteorite installs these community packages for you, it looks like when it is folded into meteor it will remain this way (installing into /packages).
So in short, the 'official' packages aren't installed in /packages because they are available in all meteor distributions, whereas the unsupported ones from atmosphere need to be downloaded for the project in question into /packages.

Related

Meteor check available versions available for atmosphere js package

Is it possible to check all available versions of an atmospherejs package?
For example, I am trying to install the twbs:bootstrap#=4.0.0-alpha.4 following their github page
But this does not install giving error:
no such version twbs:bootstrap#=4.0.0-alpha.4
Hence I am looking to find a way to check which versions are available for any given atmospherejs meteor package.
You can use
meteor show twbs:bootstrap
or
meteor show --show-all twbs:bootstrap
for older or pre-released versions. Latest available version is 4.0.0-alpha2

what would I use for a meteor package manager

I understand meteor has their own package manager under the covers (that way meteor deploy works to include the packages) but I'm looking for a package manager for meteor. By package manager, i'm looking for like bundler/gemfile (ruby) or maven/pom file (java).
Again I understand the meteor install works fine, but I want to define my own "private" packages as well as have a file to put the package declarations in so when I go to update I can do it easily.
I saw meteorite, but I also read where as of meteor 0.9.0 it is no longer needed.
Thanks!
EDIT:
so for example, in ruby you have the bundler gem which has a gemfile. in the gemfile you put
source 'https://rubygems.org'
gem '<gem_name>','<gem_version>'
gem '<gem_name>','<gem_version>'
and anytime you want to install all the dependencies on a new machine you just run bundle install and it installs the dependencies into the new machine.
I want to do something similar in meteor. example: I have a meteor project that takes the karma and angular-meteor packages (as well as a couple private packages in a bitbucket repo).
so in a gemfile, it would look something like this
source 'http://<atmosphere_url>'
package 'uringo:angular','0.8.8'
package 'sanjo:karma','1.5.1'
source 'https://<my_bit_bucket_repo'>'
package 'name:package1','0.0.1'
package 'name:package2','0.0.1'
and then I just need the command to run the package manager to install the different packages.
It looks like I have to keep packages with the code. So in the top level directory, there's the package folder and all my internal packages for the project will need to live there. Then I just modify the .meteor/project file to include which packages I want in that build. Then when I launch meteor then even though there are many packages in my /packages folder, only the packages in the .meteor/project file will be included.
In addition to the packages in the official Meteor release being used by your app, meteor list and meteor add also search the packages directory at the top of your app. You can also use the packages directory to break your app into subpackages for your convenience, or to test packages that you might want to publish. See Writing Packages. -- http://docs.meteor.com/#/full/usingpackages
so this means just because the package is included in the /packages directory within the project, doesn't mean the project is actually 'using' the package.

How to add spiderable 1.0.8 to my meteor project?

Currently the latest public version of the Spiderable package is 1.0.7 (atmosphere link). However on Github the version has been bumped to 1.0.8 (4 days ago).
I need the features from the 1.0.8 update. What's the best way for me to use the 1.0.8 version? I've tried:
meteor add spiderable#1.0.8
But it didn't work, the output was: error: no such version spiderable#1.0.8 .
This version of spiderable has not yet been published by MDG. This is why it says no such version.
While a package is being developed the version may be higher than the version available for use. When it has been tested its usually published along the next meteor version.
There may still be more changes to the package until its published.
If you want to use the package anyway you can copy the spiderable directory from github into a packages/spiderable directory. This may not work with certain dependency errors depending on whether another package using spiderable is required.
The second is to use the github version of meteor. Which is to clone the meteor project using git clone https://github.com/meteor/meteor then use the meteor binary (with the full absolute path) to run your project instead of meteor on its own.

Meteor version solver: why does "meteor update" downgrade packages?

I have this in a package:
api.use([
'kestanous:herald#1.1.3',
'kestanous:herald-email',
]);
As expected, Meteor uses version 1.1.3 of the Herald package.
If I remove the #1.1.3 version, the package's versions.json doesn't change.
But now if I run meteor update kestanous:herald, here's what I get:
$ meteor update kestanous:herald
Changes to your project's package version selections from updating package versions:
kestanous:herald downgraded from 1.1.3 to 1.0.1
It doesn't make sense to me that upgrading a package would actually downgrade it. Especially since kestanous:herald is used nowhere else in the app. Even stranger, there are still no changes to the package's versions.json file despite the message.
So it seems either I don't understand how package versioning works, or else something is not working correctly?
I'm not sure if i'm right on this 100% because the system used is quite weird & has changed so many times until very recently.
Meteor's new package system works on a constraint solver. Each package declares the version of Meteor its designed for, e.g if you designed it for Meteor 0.9.2 and you run it on Meteor 0.1.0 there is a slight difference in the blaze package.
So if a package one of your other packages is dependent on has uses this older version of blaze then the other packages will be downgraded so that it can match this constraint, such that the latest versions of all included packages are used as long as the constraint is matched.
So this can happen if herald has a constraint on it of some older Meteor package or version, or has a dependency on some older package.
While the package doesn't have to be defined explicitly it can be defined implicitly from api.versionsFrom("XXX") too.
Meteor then upgrades or downgrades the packages accordingly.
Additionally there is a "leeway" allowed with the packages allowed depending on the semver spec, minor package version updates are okay, but the major ones force a downgrade, since the new version is deemed incompatible. There's a bit of a discussion on this too.
This is the package.js file for the package for kestanous:herald:
api.versionsFrom('METEOR#0.9.2');
api.use(['check', 'underscore', 'tracker','accounts-base', 'blaze', 'artwells:queue#0.0.3']);
This means that all packages in your meteor project will attempt to be downgraded so that all of them can be compatible with these other dependencies.
If you upgraded the versionsFrom, then meteor would be more accepting to newer versions in other packages.
https://github.com/Meteor-Reaction/Herald/blob/master/package.js#L9

Meteor: GraphicsMagick not installing, probably a very simple issue

I'm wanting to try out the "gm" node package. I've currently got node-gd installed and want to see what gm offers.
I'm using Meteor 0.9.0.1 and this is my packages.json file:
{
"node-gd":"0.2.3",
"gm" :"1.16.0"
}
I ran "meteor update" .... It didn't install, so I guess I've done something wrong.
me#ubuntu:~/myapp$ meteor update
Refreshing package metadata. This may take a moment.
Refreshing package metadata. This may take a moment.
upgraded autoupdate from version 1.0.4 to version 1.0.5
upgraded less from version 1.0.5 to version 1.0.6
myapp: updated to Meteor 0.9.0.1.
All your package dependencies are already up to date.
Can anyone advise how to install this?
I think you need meteorhacks:npm
meteor add meteorhacks:npm
meteor
This should trigger the installation of the npm modules. Of note may be the new notation is Meteor.npmRequire and no longer Meteor.require

Resources