TryGhost/Ghost

Prep & tests in prep for node v12

ErisDS opened this issue · 15 comments

Node v12 has been on the horizon for a while and looming closer, and there has been much talk of getting Ghost ready for it - so let's do it!

Ghost's node version support is loosely tied to that of node-sqlite3 and they have had support for node >= 0.11.13 for some time.

I suggest that we add tests for the most recent version of v11 (0.11.14), test out some of the more complex features that aren't yet covered by our tests, and if everything is a-ok, add 0.11.14+ to the supported engines in the package.json file.

I know that @jaswilli has done some of this already, so will let him call first dibs 😉.

0.11.14 support is currently blocked on:

TryGhost/node-sqlite3#352 and Rowno/grunt-mocha-cli#24

It is generally unrealistic to support binaries for node-sqlite for uneven/unstable node.js versions. I've provided node v0.11.x binaries for node-sqlite3 as an experiment more than a solution - more details (and options you can reflect on) at TryGhost/node-sqlite3#352 (comment)

Hey @springmeyer ,

I appreciate you stopping by. I'm just using this issue to track how Ghost is doing against node v0.11 as 0.12-release gets closer and closer so we can stay on top of any problems in order to make the transition as easy as possible.

We actually don't even allow Ghost to run on node 0.11.x at all. If node-sqlite3 was actually broken I'd be concerned but just having the bindings broken because of an ABI change is a complete non-issue since I can just compile them on my own in order to do testing.

@jaswilli - sounds good, thanks for the details. In the meantime I am going to move on mapbox/node-pre-gyp#124. I think if we version binaries on major.minor.patch then it is realistic to ship them to users. This puts more burden on the developer packaging binaries, but I'm up for it in this case because I too hope node v0.12.x is close?

@springmeyer As always, who knows for sure but I stumbled on this: nodejs/node-v0.x-archive#7784 (comment) last week which implies that it could be really soon.

Ghost currently breaks on 0.12. Considering that this is now the main release version of Node, Ghost now breaks on fresh installs of Node. Sqlite seems to be part of the reason behind this incompatibility.

Hi @ScottSmith95 ,

There will be a little time in between a major version release and packages catching up to support it, especially in the case where native binaries are involved (like the sqlite3 package).

Once our downstream dependencies have a chance to sort things out, we'll do the same and see where we're at. I don't expect 0.12 support to pose any major problems though.

Yes, this is a really important issue. I suggest displaying a very clear warning message in the Github repo and download page saying that Ghost is not compatible with Node.js v.0.12 and an approximate date of when it will be. That might help reduce the frustration of people trying to make Ghost work for the first time

jw84 commented

I've been struggling to get Ghost setup and it keeps getting stuck at sqlite3 install. My node is v0.12.0 and npm is v2.5.1, would this be related? If I roll back to v0.10.x it'll be alright?

Yep. Ghost only runs on 0.10 at the moment.

jw84 commented

So starts my journey to isolate node in its own environment

node-sqlite3@3.0.5 works great on node v0.12.x (https://github.com/mapbox/node-sqlite3/releases/tag/v3.0.5). So ghost can and should upgrade to this release. /cc @ErisDS @jaswilli

jw84 commented

I updated my package.json and npm-shrinkwrap.json to node@0.12.0 and node-sqlite3@3.0.5 but now getting stuck at node-sass@1.2.3 breaking on install.

EDIT: As you were, updated to grunt-sass@0.18.0 and all is well

Done!