-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with Meteor 1.3 #15
Comments
Hi Nolan, Sorry, I'm a bit confused. Meteor's packaging system has had built-in support for declaring dependencies on NPM packages for a long time. If you do that, meteor-spk should take care of making sure those packages make their way into the SPK. Specifically, I haven't kept up with the changes in Meteor 1.3, though. Is it breaking this somehow? |
You can now put a package.json in your Meteor 1.3 apps and are expected
to do an `npm install` as a step before `meteor build`. This is separate
from, and will likely replace in many cases, putting NPM package
dependencies in Meteor packages simply to use NPM packages in Meteor.
So now where we have:
```
cd /opt/app
meteor build --directory /home/vagrant/
```
in build.sh, you'd now do:
```
cd /opt/app
if [ -e package.json ]; then
npm install
fi
meteor build --directory /home/vagrant/
```
Anyhow, I've dug a bit deeper, and it looks like the vagrant-spk build
scripts access npm from within the .meteor directory. So it's included,
just getting at it isn't obvious, and I need to in order to invoke npm
at the right points. Maybe this issue should be closed, or repurposed as
a general "what's needed to get Meteor 1.3 working in Sandstorm"
discussion. I'll be hacking on that, but finding npm was a bit much for
my coffee-deprived brain this morning when I filed this. :) I was
looking at the dependency-packing logic in meteor-spk and didn't see
anywhere referencing the npm binary as was true with node and others.
|
Well, npm is a build-time dependency, not a runtime dependency, so it shouldn't be included in the spk like the node binary is. FWIW this line does From what you are saying it sounds like @zarvox I forget, does |
So I added code similar to the above to my build.sh. I'm able to build the app, but am told that Meteor requires node 0.10.41 or greater to run. The version of node shipped with Meteor 1.1.3 is 0.10.36. I'm wondering if the launcher script is using that, despite my Meteor app being set to 1.3 beta? I definitely have the correct Meteor build tools in place. Where is Thanks. |
See this issue for more about the |
@kentonv It will need to be updated separately, but it should be reasonably straightforward to do so: https://github.com/sandstorm-io/vagrant-spk/blob/master/stacks/meteor/build.sh @ndarilek usually However, we are using the This does seem like a problem for meteor-spk in general though - the version of node will be whatever meteor-spk ships, not whatever your project specifies. |
I see, it looks like As for the node version error, yeah, we generally need to rev meteor-spk every time there is a new Meteor release. Happy to do that once 1.3 ships. In the meantime you may be able to get away with swapping out the binary manually. |
No, NPM does ship runtime dependencies alongside MDG's own package I'm a bit confused about the confusion here. :) My app's NPM-based Might be worth retitling this issue to one about Meteor 1.3, which I'll |
I've done the following in my build.sh:
```
cd /opt/app
cp
/home/vagrant/.meteor/packages/meteor-tool/1.1.13-beta.12/mt-os.linux.x86_64/dev_bundle/bin/*
"$METEOR_DEV_BUNDLE"/bin
"$METEOR_DEV_BUNDLE/bin/npm" install
```
I've confirmed that `node -v` in $METEOR_DEV_BUNDLE/bin is 0.10.41, but
I still get the error.
Where is meteor-spk getting its node binary? I don't see a path or any
other environment variable set in launcher.sh, just `exec node`. If it's
getting it from $METEOR_DEV_BUNDLE/bin then I don't know what I'm
missing. Looks like Meteor may be hiding a few additional node binaries
around but I haven't investigated each `find . -name node` result.
Thanks.
|
|
So admittedly this won't work until 1.3 released Monday, but the new However you can use
I have an app using the diy stack, community Mongo packages and a vanilla Meteor install, no more meteor-spk. If there's interest, I can work it into a |
Note that the But yeah, this could be a more-robust way to find the path of the node binary. |
In my case it is included in the SPK because I've done away with
meteor-spk and use the diy stack. It doesn't run at all however, failing
silently. I've attempted to run it via the nsenter method but no luck.
In any case I'm having pretty good results with this setup except,
perhaps, for larger SPKs. My ebook reader is at 62M but it does have to
pull in lots of Calibre and various Python standard libraries.
|
Ah, yeah, the |
I just pushed meteor-spk 0.1.9 to support Meteor 1.3.1. I concluded that it is not meteor-spk's job to run |
I guess my take on this is that |
Out of curiosity, why is Meteor a special snowflake? Why does it need
its own specific SDK, prepackaged Node binaries, exclusion of the
/usr/bin/meteor binary, etc. when just about every other SDK/stack (or
every other, AFAIK) bootstraps itself out of the distribution package
repositories?
I know it came as a surprise to me when I wanted to build a Meteor app
that interfaces with non-Meteor binaries/libraries that there was this
whole special sandbox for Meteor, and I couldn't just count on being
able to install what I want and have spk pick that up.
Sorry if this sounds snappish, it isn't intended to be. :) It just seems
like you're making a whole lot more work for yourselves, particularly
when Meteor starts bumping its Node version soon and you're not able to
keep up, or when MDG starts promoting Apollo and suddenly I can't use my
Rethink/Postgres/SQLite Meteor app because the SDK doesn't support me.
I'd kind of hoped we could iron out any issues with the setup
[here](https://github.com/ndarilek/alexandria/tree/master/.sandstorm)
and make that or something like it the new Meteor stack. Or even if we
don't use that work, just use something that doesn't lock me in to the
old and quickly-going-away pre-1.3 way of doing things. MDG is already
working on an SQLite-based Apollo app, and given all that work is being
packaged as NPM packages, I wouldn't be surprised if maybe much of it is
usable in 1.3.1.
Thanks.
|
Wow! I didn't realize sqlite in Meteor is coming soon! That's shocking and Nolan, to be a little pedantic, but hopefully in a useful way: Sandstorm Given that, I think the best place for this particular conversation is an |
I can get to it, but probably not for a day or two as I'm super busy. If
you do it by then feel free to mention me, otherwise I'll definitely
file it as I don't want to lose flexibility with Meteor. :)
|
Perhaps this is already present and I don't see it. There are lots of changes coming down the pipe in Meteor 1.3, and (I don't think) it is yet clear how to
meteor build
. However, one thing is certain, NPM integration works out of the box.To that end, it'd be nice if meteor-spk shipped a recent version of NPM. We still have to hack our build scripts to insert
npm install
s and copy package.json around, but having NPM installed automatically would make figuring out the correct incantations easier. Having a release that shipped NPM would be very helpful.Thanks!
The text was updated successfully, but these errors were encountered: