Skip to content
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

Support for newer versions of nodejs (4.0.0) #5821

Closed
danieldiekmeier opened this issue Sep 9, 2015 · 40 comments · Fixed by #6117
Closed

Support for newer versions of nodejs (4.0.0) #5821

danieldiekmeier opened this issue Sep 9, 2015 · 40 comments · Fixed by #6117
Milestone

Comments

@danieldiekmeier
Copy link

Yesterday, nodejs released the first "stable" version, which is 4.0.0. But when I try running Ghost with it, it tells me I need to use at most 0.12.7.

ERROR: Unsupported version of Node
Ghost needs Node version ~0.10.0 || ~0.12.0 you are using version 3.3.0

What is your plan for supporting future versions?

Also: Can I circumvent this restriction? Running it locally would suffice, on my server I only have 0.12.7.

@andrewsomething
Copy link

Among the dependencies, node-sqlite3 will need to make a new release with support for 4.0.0 (See: TryGhost/node-sqlite3#495).

@ErisDS
Copy link
Member

ErisDS commented Sep 9, 2015

Currently, Ghost does not work with Node 4.0.0, as some of our dependencies are not yet ready (including the mentioned node-sqlite3 module).

We will update our dependencies as and when they become compatible and once we reach full compatibility will update our build process to & restrictions include Node 4.0.0 support.

Once Ghost is able to support 4.0.0, we will need to do a release - that release will be clearly marked as including support.

You can circumvent the restrictions on node versions in the meantime, but if you do - it'll be up to you to manage getting Ghost to work on the version you choose, which may not even be possible ;)

@springmeyer
Copy link

Working on getting a node-sqlite3 release out today.

@springmeyer
Copy link

node-sqlite3 v3.1.0 is now out with io.js 3.x and node 4.x support.

@springmeyer
Copy link

One heads up: this node-sqlite3 release does not provide linux 32 bit binaries because I ran out of time getting them working. They have been hard to keep working (the binary building) - so I'm interested if the ghost team thinks they are still useful and I'll try to get them working again /cc @ErisDS

@ErisDS
Copy link
Member

ErisDS commented Sep 10, 2015

@springmeyer do you know if they get downloaded often? That might be the best stat available. Alternatively, see how it goes without them and if either project gets inundated with support then they can be considered still needed?

Also, is there something we can do to help?

@pensierinmusica
Copy link

Can you please update package.json to include "sqlite3": "^3.1.0"?

Thanks!

@cwonrails
Copy link

@pensierinmusica +1 - been running Ghost 0.70 on node 4.0.0 with "sqlite3": "3.1.0" in package.json.

@cwonrails
Copy link

Running in prod now, it's fine with the sqlite update.

@pensierinmusica
Copy link

@cwonrails have you tried most of the functionality (e.g. posting new articles, managing tags, creating users, tweaking options, etc.) and it doesn't give you any bug?

If so, I'd be up to switch too :)

@ghost
Copy link

ghost commented Sep 11, 2015

@ErisDS hi, does ghost now support nodejs v4.0.0? because package.json says otherwise?

@cwonrails
Copy link

@pensierinmusica I swapped back for reasons other than functionality failures (my one click DigitalOcean install was/is acting up after trying to manually update node, and I don't want to edit the upstart scripts), but for my local dev environment everything was all good.

@ErisDS ErisDS changed the title Support for newer versions of nodejs Support for newer versions of nodejs (4.0.0) Sep 12, 2015
@ErisDS ErisDS added this to the Post-Zelda milestone Sep 14, 2015
@ndaidong
Copy link

Confirmed. Updating package.json "sqlite3" version from "^3.0.8" to "^3.1.0" solves installation issue.

Failed while installing Ghost with Node.js 4.0.0

@ChrisRus
Copy link

Note that after patching package.json to sqlite3 ^3.1.0 it is also necessary to update the required node version constraint in package.json to eliminate the runtime error on npm start.

@ErisDS
Copy link
Member

ErisDS commented Sep 22, 2015

Sqlite3 is ready, but what hasn't yet been fully tested (or at least no one has yet reported on) is whether the build tool suite and all the dev dependencies are ready yet.

@cwonrails
Copy link

@ErisDS I just made an asciicinema of a successful install with node v4.1.0:

Note: Grunt init isn't freezing there, it always takes a long time for me regardless of OS/node version.

@ErisDS
Copy link
Member

ErisDS commented Sep 25, 2015

I'm tracking this: expressjs/express#2754

@edsadr
Copy link
Contributor

edsadr commented Oct 14, 2015

@ErisDS this looks like we are just waiting for express confirmation of their dependencies to be Node V4 compatible, there is not so far any problem detected with them and they are just waiting to check their dev dependencies, I have been testing Ghost with Node V4 for a week already, in dev and prod envs and so far everything looks really good I even did profiling for it with great results, also did the homework checking dev dependencies for Express (current included version in Ghost) and Ghost 0.7.1

Here are the reports for both projects tested against Node V4.2.0 using https://github.com/nodesource/upgrade-ready by NodeSource (https://nodesource.com/services/upgrade-self-service):

http://upgrade-ready.nodesource.com/summary/afa6e7b0-721c-11e5-97f9-4fabad8c9360
http://upgrade-ready.nodesource.com/summary/afa6e7b0-721c-11e5-97f9-4fabad8c9360

The only dependency failing is as we currently know is sqlite3 as Ghost is using an outdated version and the only blocking thing here is to update that one and the engines section of Ghost package.json

Really looking forward to have Ghost running V4 is the best interest of NodeSource

@edsadr
Copy link
Contributor

edsadr commented Oct 18, 2015

@cwonrails you dont need to comment those line, just update the engines section in the package.json

@ErisDS
Copy link
Member

ErisDS commented Oct 21, 2015

As @halfdan pointed out - there are also memory issues with node 4 that will heavily impact many Ghost users on small VPS setups: nodejs/node#3370

We will need to have very specific documentation for Node 4 to help mitigate this. Upgrading to support the newer version is non-trivial IMO and we will probably only support LTS versions of Node.

@IamRafy
Copy link

IamRafy commented Oct 26, 2015

Tried changing the sqlite version after changing node version from package.json file and still the same problem .

@cwonrails
Copy link

@IamRafy My fork works if you want to check it out.

@jgillich
Copy link
Contributor

jgillich commented Nov 9, 2015

IMO, Ghost should not refuse to run on newer node versions. There are already several Linux distros shipping newer versions (opensuse 4.x, arch 5.x) and new major releases seem to happen quickly now.

@cwonrails
Copy link

@jgillich +1

@edsadr
Copy link
Contributor

edsadr commented Nov 9, 2015

well .. I would say 👍 @jgillich .. but Ghost prefers to be really conservative about it... so... better to have at least LTS support than nothing...

@jgillich
Copy link
Contributor

jgillich commented Nov 9, 2015

FWIW, the tests succeed on both 4 and 5.

@edsadr I'm not saying we should really encourage the latest node. Warn users, make them confirm that they know what they're doing. If something breaks, great, they will report it and we get to fix things early. The longer we wait, the more users will be affected by potential bugs.

edsadr added a commit to edsadr/Ghost that referenced this issue Nov 10, 2015
Ref TryGhost#5821

- Adding Node 4.2 in supported engines at package.json
- Adding Node 4.2 version in Travis
@edsadr
Copy link
Contributor

edsadr commented Nov 10, 2015

@ErisDS would be nice if we can discuss ... I am really trying to help, but better if you provide more details, as I said this was the initial one, there was some comments inside asking and I would work on the details after your feedback... but just closing it without explaining better... it just feels a bit rude

@ErisDS
Copy link
Member

ErisDS commented Nov 10, 2015

@edsadr As I explained, the work that is needed is not a simple text change. You opened a PR with text-only version changes - the same as previous PRs that I have also closed.

@devurandom
Copy link

Seems to work here after following patch:

diff --git a/core/client/package.json b/core/client/package.json
index 2f3013c..c403362 100644
--- a/core/client/package.json
+++ b/core/client/package.json
@@ -20,7 +20,7 @@
   "license": "MIT",
   "devDependencies": {
     "broccoli-asset-rev": "^2.1.2",
-    "ember-cli": "1.13.8",
+    "ember-cli": "^1.13.12",
     "ember-cli-app-version": "0.5.0",
     "ember-cli-babel": "^5.1.3",
     "ember-cli-content-security-policy": "0.4.0",
diff --git a/package.json b/package.json
index d899e08..8207866 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
     "test": "grunt validate --verbose"
   },
   "engines": {
-    "node": "~0.10.0 || ~0.12.0",
+    "node": "~0.10.0 || ~0.12.0 || ~5.x",
     "iojs": "~1.2.0"
   },
   "dependencies": {

The former is required, because certain dependencies of Ember 1.13.8 do not compile against the V8 version included in NodeJS 5.0.0. The latter simply adds NodeJS 5.0.0 as an allowed NodeJS version.

jgillich added a commit to jgillich/Ghost that referenced this issue Nov 23, 2015
* Do not error when node unsupported if GHOST_NODE_VERSION_CHECK=false is set
* Run engine check in preinstall script
* Add 4.2 to travis

issue TryGhost#5821
ErisDS added a commit to ErisDS/Ghost that referenced this issue Nov 23, 2015
@jgillich
Copy link
Contributor

Yay 👍

@ErisDS npm-check-engines is now on npm.

ErisDS added a commit to ErisDS/Ghost that referenced this issue Nov 26, 2015
refs TryGhost#5821, TryGhost#6063

- switch out help test to go to a comprehensive doc
- change error codes from 1 to unique codes
@ErisDS
Copy link
Member

ErisDS commented Nov 30, 2015

@jgillich nice :) @boennemann might this (npm-check-engines) be something to include in greenkeeper?

@jgillich
Copy link
Contributor

jgillich commented Jan 5, 2016

@LordMetroid GHOST_NODE_VERSION_CHECK=false

See http://support.ghost.org/supported-node-versions/

@zaiddabaeen
Copy link

I got it working with Node v5.

See here: http://blog.z-proj.com/running-ghost-with-node-v5/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.