Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

serverless update check failed error

I want to intsall serverless on my kali linux . In order to proceed for serverless installalation we need node js install , which i have already done .

root@gpunk:~# npm --version
3.10.10
root@gpunk:~# node --version
v6.10.0
root@gpunk:~# nvm --version
0.31.0

(Some solutions on github suggested to install node js by nvm to solve this issue , tried that as well..) . now when i run the command to npm install -g serverless to install serverless , i get following error message .

root@gpunk:~# npm install -g serverless
/root/.nvm/versions/node/v6.10.0/bin/serverless -> /root/.nvm/versions/node/v6.10.0/lib/node_modules/serverless/bin/serverless
/root/.nvm/versions/node/v6.10.0/bin/slss -> /root/.nvm/versions/node/v6.10.0/lib/node_modules/serverless/bin/serverless
/root/.nvm/versions/node/v6.10.0/bin/sls -> /root/.nvm/versions/node/v6.10.0/lib/node_modules/serverless/bin/serverless

> [email protected] postinstall /root/.nvm/versions/node/v6.10.0/lib/node_modules/serverless
> node ./scripts/postinstall.js


┌───────────────────────────────────────────────────┐
│          serverless update check failed           │
│        Try running with sudo or get access        │
│       to the local update config store via        │
│ sudo chown -R $USER:$(id -gn $USER) /root/.config │
└───────────────────────────────────────────────────┘
/root/.nvm/versions/node/v6.10.0/lib
`-- [email protected] 

What possible mistake am i making , and how to overcome it ??

like image 436
Sandip Kumar Avatar asked Dec 04 '17 11:12

Sandip Kumar


1 Answers

I've had a similar issue on Ubuntu 16.04. The issue was an optional postinstall script that failed.

I found the solution to be as follows:

npm install -g try-thread-sleep
npm install -g serverless --ignore-scripts spawn-sync

Source: https://github.com/serverless/serverless/issues/4319

like image 109
Anubhav Misra Avatar answered Nov 20 '22 04:11

Anubhav Misra