Cannot install Now for nodejs 4.x


(Elhamdaoui Abdelmajid) #1
$ sudo npm install -g now
/usr/local/bin/now -> /usr/local/lib/node_modules/now/download/dist/now

> now@13.0.0 postinstall /usr/local/lib/node_modules/now
> node download/install.js

/usr/local/lib/node_modules/now/download/dist/index.js:1
(function (exports, require, module, __filename, __dirname) { module.exports=function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return

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 Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/now/download/install.js:16:1)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
npm ERR! Linux 4.4.0-141-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "now"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! now@13.0.0 postinstall: `node download/install.js`
npm ERR! Exit status 1

(Lars Willighagen) #2

This is likely not related to npm, but the postinstall script of now. Thereโ€™s a bug report here: