threefoldtecharchive / jumpscaleX_builders

Apache License 2.0
1 stars 0 forks source link

node & npm builder uses too old versions #31

Closed abom closed 4 years ago

abom commented 4 years ago

Current node and npm versions installed by the builder are too old, some new packages cannot be build (newer es features...etc).

for example, building threefold.io website

git clone git@github.com:threefoldfoundation/www_threefold.io_new.git
npm install
npm run build
> svelte-app@1.0.0 build /sandbox/code/github/threefoldfoundation/www_threefold.io_new
> rollup -c

[!] SyntaxError: Unexpected token function
/sandbox/code/github/threefoldfoundation/www_threefold.io_new/node_modules/svelte/compiler.js:23956
        async function replace_async(str, re, func) {
              ^^^^^^^^
SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:76:16)
    at Module._compile (module.js:542:28)
    at Module._extensions..js (module.js:579:10)
    at Object.require.extensions..js (/sandbox/code/github/threefoldfoundation/www_threefold.io_new/node_modules/rollup/dist/bin/rollup:841:17)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/sandbox/code/github/threefoldfoundation/www_threefold.io_new/node_modules/rollup-plugin-svelte/index.js:11:4)

Current versions:

$ node -v
v6.9.5
$ npm -v
3.10.10

We need at least current lts versions

$ node -v
v10.16.3
$ npm --version
6.9.0

and of course, we need to remove this kind of checks too

        rc, out, err = j.sal.process.execute("npm -v")
        if out.replace("\n", "") != "3.10.10":
            raise j.exceptions.Base("npm version error")
hossnys commented 4 years ago

verified on development 65567fb :

3BOTDEVEL:3bot:~: npm -v
6.9.0
3BOTDEVEL:3bot:~: node -v
v10.16.3