Can't get GD5 dev environment to run

When I run these commands as written on github:

git clone https://github.com/4ian/GD.git
cd GD/newIDE/app
yarn

I get this error:

~/development/GD5/GD/newIDE/app $ yarn
yarn install v1.7.0
warning You are using Node "4.2.6" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
[1/4] Resolving packages...
[2/4] Fetching packages...
error file-loader@1.1.6: The engine "node" is incompatible with this module. Expected version ">= 4.3 < 5.0.0 || >= 5.10".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

And when I run “npm install” as mentioned instead:

~/development/GD5/GD/newIDE/app $ npm install
npm WARN deprecated material-ui@0.20.1: You can now upgrade to @material-ui/core
npm WARN deprecated keen-tracking@1.1.3: Deprecated

WARN engine file-loader@1.1.11: wanted: {"node":">= 4.3 < 5.0.0 || >= 5.10"} (culoadDep:webpack-hot-middl 
WARN engine webpack@3.12.0: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (currentnpm WARN deprecated array.prototype.flatten@1.2.1: This method has been renamed to "flat" - please use `array.prototype.flat` instead
WARN engine dotenv@5.0.1: wanted: {"node":">=4.6.0"} (current: {"node":"4.2.6","loadDep:schema-utils → re
WARN engine schema-utils@0.4.5: wanted: {"node":">= 4.8.0 || >= 6.9.0 || >= 8.9.loadDep:punycode → reques 
WARN engine punycode@2.1.1: wanted: {"node":">=6"} (current: {"node":"4.2.6","nploadDep:path-parse → cach 
WARN engine schema-utils@0.3.0: wanted: {"node":">= 4.3 < 5.0.0 || >= 5.10"} (culoadDep:json-schema-trave
WARN engine schema-utils@0.3.0: wanted: {"node":">= 4.3 < 5.0.0 || >= 5.10"} (culoadDep:yargs → request
WARN engine loader-runner@2.3.0: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current: {"node":"4.2.6","npm":"3.5.2"})
WARN engine enhanced-resolve@3.4.1: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} loadDep:yargs → cache
WARN engine uglifyjs-webpack-plugin@0.4.6: wanted: {"node":">=4.3.0 <5.0.0 || >=loadDep:urix
WARN engine atob@2.1.1: wanted: {"node":">= 4.5.0"} (current: {"node":"4.2.6","nloadDevDep:unzip2 → 304
WARN engine react-scripts@1.0.17: wanted: {"node":">=6"} (current: {"node":"4.2.loadDep:chalk → resolveWi
WARN engine dotenv@4.0.0: wanted: {"node":">=4.6.0"} (current: {"node":"4.2.6","loadDep:eslint-plugin-flo
WARN engine file-loader@1.1.5: wanted: {"node":">= 4.3 < 5.0.0 || >= 5.10"} (curloadDep:webpack → resolve
WARN engine webpack@3.8.1: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current:loadDep:fsevents → resolv
WARN engine webpack-dev-server@2.9.4: wanted: {"node":">=4.7"} (current: {"node":"4.2.6","npm":"3.5.2"})
WARN engine extract-text-webpack-plugin@3.0.2: wanted: {"node":">= 4.8 < 5.0.0 |loadDep:fsevents → 304
WARN engine react-dev-utils@4.2.1: wanted: {"node":">=6"} (current: {"node":"4.2loadDep:schema-utils
WARN engine schema-utils@0.3.0: wanted: {"node":">= 4.3 < 5.0.0 || >= 5.10"} (culoadDep:fast-deep-equal
WARN engine schema-utils@0.3.0: wanted: {"node":">= 4.3 < 5.0.0 || >= 5.10"} (cunpm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js

> grpc@1.10.1 install /home/xxx/development/GD5/GD/newIDE/app/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "/home/xxx/development/GD5/GD/newIDE/app/node_modules/grpc/src/node/extension_binary/node-v46-linux-x64-glibc/grpc_node.node" is installed via remote

> uglifyjs-webpack-plugin@0.4.6 postinstall /home/xxx/development/GD5/GD/newIDE/app/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> gdevelop-ide@0.1.0 postinstall /home/xxx/development/GD5/GD/newIDE/app
> npm run import-resources


> gdevelop-ide@0.1.0 import-resources /home/xxx/development/GD5/GD/newIDE/app
> cd scripts && node import-libGD.js && node import-res-folder.js && node import-GDJS-Runtime.js && node import-piskel-editor.js

 Unable to find libGD.js, downloading it from github.com/4ian/GDevelop.js (be patient)...
 libGD.js downloaded and stored in public/libGD.js
 Copied libGD.js to node_modules folder
 Images from res, CppPlatform and JsPlatform properly copied in public folder
ℹ️ Copying GDJS and extensions runtime files (*.js) to '/home/xxx/development/GD5/GD/newIDE/app/resources/GDJS/Runtime'...
 Copied GDJS and extensions runtime files (*.js) to '/home/xxx/development/GD5/GD/newIDE/app/resources/GDJS/Runtime'.
 Unable to find piskel-editor, downloading it from github.com/4ian/GD (be patient)...
 Extracting piskel-editor.zip to public/External/Piskel folder
 Extracted piskel-editor.zip to public/External/Piskel folder
gdevelop-ide@0.1.0 /home/xxx/development/GD5/GD/newIDE/app

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
npm WARN optional Skipping failed optional dependency /react-scripts/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
npm WARN optional Skipping failed optional dependency /webpack-dev-server/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.2.4
npm WARN material-ui-search-bar@0.4.1 requires a peer of react@^15.5.4 but none was installed.
npm WARN @storybook/react@3.2.19 requires a peer of babel-core@^6.26.0 | ^7.0.0-0 but none was installed.
~/development/GD5/GD/newIDE/app $ npm start

> gdevelop-ide@0.1.0 start /home/xxx/development/GD5/GD/newIDE/app
> npm run import-resources && react-scripts start

> gdevelop-ide@0.1.0 import-resources /home/xxx/development/GD5/GD/newIDE/app
> cd scripts && node import-libGD.js && node import-res-folder.js && node import-GDJS-Runtime.js && node import-piskel-editor.js

 libGD.js already existing in public folder - skipping download
 Images from res, CppPlatform and JsPlatform properly copied in public folder
ℹ️ Copying GDJS and extensions runtime files (*.js) to '/home/xxx/development/GD5/GD/newIDE/app/resources/GDJS/Runtime'...
 Copied GDJS and extensions runtime files (*.js) to '/home/xxx/development/GD5/GD/newIDE/app/resources/GDJS/Runtime'.
 piskel-editor already existing in public/External/Piskel folder - skipping download
/home/xxx/development/GD5/GD/newIDE/app/node_modules/react-scripts/scripts/start.js:31
const {
      ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

npm ERR! Linux 4.13.0-45-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! gdevelop-ide@0.1.0 start: `npm run import-resources && react-scripts start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gdevelop-ide@0.1.0 start script 'npm run import-resources && react-scripts start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the gdevelop-ide package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run import-resources && react-scripts start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs gdevelop-ide
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls gdevelop-ide
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/xxx/development/GD5/GD/newIDE/app/npm-debug.log

(I had to remove some lines from the above code because the forum got a sql error on submitting probably due to some character)
npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle gdevelop-ide@0.1.0~prestart: gdevelop-ide@0.1.0
6 silly lifecycle gdevelop-ide@0.1.0~prestart: no script for prestart, continuing
7 info lifecycle gdevelop-ide@0.1.0~start: gdevelop-ide@0.1.0
8 verbose lifecycle gdevelop-ide@0.1.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle gdevelop-ide@0.1.0~start: PATH: /usr/share/npm/bin/node-gyp-bin:/home/xxx/development/GD5/GD/newIDE/app/node_modules/.bin:/mnt/5634F61F34F601B3/GemeinsameDateien/Entwicklung/gdevelop_projects/cocos2dx/cocos2d-x-3.10/templates:/mnt/5634F61F34F601B3/GemeinsameDateien/Entwicklung/gdevelop_projects/cocos2dx:/mnt/5634F61F34F601B3/GemeinsameDateien/Entwicklung/gdevelop_projects/cocos2dx/cocos2d-x-3.10/tools/cocos2d-console/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle gdevelop-ide@0.1.0~start: CWD: /home/xxx/development/GD5/GD/newIDE/app
11 silly lifecycle gdevelop-ide@0.1.0~start: Args: [ '-c', 'npm run import-resources && react-scripts start' ]
12 silly lifecycle gdevelop-ide@0.1.0~start: Returned: code: 1  signal: null
13 info lifecycle gdevelop-ide@0.1.0~start: Failed to exec start script
14 verbose stack Error: gdevelop-ide@0.1.0 start: `npm run import-resources && react-scripts start`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/share/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/share/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:821:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid gdevelop-ide@0.1.0
16 verbose cwd /home/xxx/development/GD5/GD/newIDE/app
17 error Linux 4.13.0-45-generic
18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
19 error node v4.2.6
20 error npm  v3.5.2
21 error code ELIFECYCLE
22 error gdevelop-ide@0.1.0 start: `npm run import-resources && react-scripts start`
22 error Exit status 1
23 error Failed at the gdevelop-ide@0.1.0 start script 'npm run import-resources && react-scripts start'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the gdevelop-ide package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     npm run import-resources && react-scripts start
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs gdevelop-ide
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls gdevelop-ide
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

I’m running Linux Mint 18.3 Cinnamon 64bit

Any ideas what’s wrong? Is the package manager version of nodejs too old?

Isn’t there a newer version of node available?, because the line: warning You are using Node "4.2.6" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
About npm, I haven’t builded it on Ubuntu but in Windows npm has some weird bugs, so I’m forced to use yarn :neutral_face:

I finally got version 8.x installed via:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

(github.com/nodejs/help/issues/579)

And now GD5 is running.