Closed darkadept closed 8 years ago
Ah, there may be something I forgot about when i was first setting up my project. Try running npm rebuild
. Also, I've only tested it on Node 5 so far.
Just tried with Node 5.12.0. Same problem. I'm going to blow away my meteor install and try again to see if it's something to do with my ~/.meteor folder.
Okay, now I understand -- since Meteor controls that folder it's only building fibers for the version of Node that Meteor is using. So if you're using a different version than Meteor does you'll have to rebuild it manually. This fixed the issue for me:
/home/mike/.meteor/packages/meteor-tool/.1.4.1_1.183vrcm++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib
npm rebuild fibers
Maybe I can eventually dig deeper into what Meteor's boot.js
does and make my package do essentially the same thing without running it, so that it has control over what node versions these packages are built for.
Awesome! That works. Works on Node 6.3.0 too.
I assume you'd have to rebuild every time you change a node version, right? Does running that rebuild potentially cause problems for other meteor apps that also use meteor 1.4.1.1? Or should I only use the exactly node version that meteor is using?
Thanks!
If you ls node_modules/fibers/bin
in that directory, you'll see that it keeps around binaries for various versions of node (the versions in the binary file names don't correspond directly to node versions, I think they correspond to v8 versions or something related). So if you have to rebuild for a different node version, you'll only have to do it before using that node version for the first time (or, since the Meteor version is in that folder name, probably when you change meteor versions as well)
But I'm sure the binaries don't have to be rebuilt for every minor change...I'm not 100% sure how they semver it because it seemed like I had to rebuild binaries when switching from 6.3.0 to 6.5.0.
Also, you can actually just run npm rebuild
without any specific package.
I'd officially recommend using Node 4, since that's what Meteor 1.4 uses and 4 is the long-term support version...but I use Node 5 in most of my projects right now.
I put instructions about this in the readme, so I'm closing this
Following the instructions in the README gives me this error when running
npm start
:This was on Node v0.11.16 with v2.3.0. I also tried with Node v6.3.0 and got the same error.