Vercel: Can not update the now cli nor remove it

Created on 23 Aug 2018  ·  3Comments  ·  Source: vercel/vercel

Hello,
I wanted to use the now-cli on the windows subsystem linux called "bash on ubuntu on windows" (it's like an ubuntu linux, hidden in windows 10 distribution).
I can't remove my global package now globally because a script install.js is missing. Can someone help me to understand what I'm missing ?

/mnt/c/Users/me ⌚ 23:14:11
$ npm install -g now
/root/.nvm/versions/node/v10.9.0/bin/now -> /root/.nvm/versions/node/v10.9.0/lib/node_modules/now/download/dist/now

> [email protected] postinstall /root/.nvm/versions/node/v10.9.0/lib/node_modules/now
> node download/install.js

module.js:487
    throw err;
    ^

Error: Cannot find module '/root/.nvm/versions/node/v10.9.0/lib/node_modules/now/download/install.js'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node download/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-08-23T21_14_57_844Z-debug.log

All 3 comments

Did you try to install Now Desktop?
Doing so is recommended and easiest way to use Now CLI as it comes bundled with it.

I am not sure but this bash on ubuntu on windows is rather something which _tries to be_ Bash than Linux subsystem. IMO that's the main issue.

Please try which now to get the patch and rm <path> to remove it. After that, try installing it fresh using yarn or npm.

Hello 👋
Here some news :

  • @robertgrzonka as I want to develop on the subsystem, having the windows client won't suit my needs, that is why I wanted to keep the npm package. Yes my OS is Windows, but I work on a unix subsystem 😄.
  • @leo I used your solution and it worked in my case ! thank you 👍

I'd like to share a list of everything I did to make it work. It is still in wip, but the look and feel to have a bash env with hyper.js / now on windows is really sweet !
Have a look => https://gist.github.com/Ugarz/2f2a4bdb724e9ae03d915d2ecc6ae661

Was this page helpful?
0 / 5 - 0 ratings