question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serverless fails to install on Ubuntu 17.04

See original GitHub issue

Hi,

I’ve tried to install Serverless framework on “new, fresh” installment of Ubuntu 17.04.

I’ve installed NodeJS using Ubuntu official repository. Version that I was offered is NodeJS v4.7.2. After that following instructions, I’ve installed npm, again same from official Ubuntu official repository. Version installed v3.5.2.

Finally, when I started to install Serverless Framework, I’ve got the following error:

astoisavljevic@aleksandar-virtualbox:~$ sudo npm install -g serverless /usr/local/bin/serverless -> /usr/local/lib/node_modules/serverless/bin/serverless /usr/local/bin/slss -> /usr/local/lib/node_modules/serverless/bin/serverless /usr/local/bin/sls -> /usr/local/lib/node_modules/serverless/bin/serverless

serverless@1.11.0 postinstall /usr/local/lib/node_modules/serverless node ./scripts/postinstall.js

sh: 1: node: not found npm ERR! Linux 4.10.0-19-generic npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g” “serverless” npm ERR! node v4.7.2 npm ERR! npm v3.5.2 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

npm ERR! serverless@1.11.0 postinstall: node ./scripts/postinstall.js npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the serverless@1.11.0 postinstall script ‘node ./scripts/postinstall.js’. 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 serverless package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./scripts/postinstall.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs serverless npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls serverless npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /home/astoisavljevic/npm-debug.log

As requested, I’m attaching npm-debug.log file to this ticket.

Thank You

npm-debug.txt

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
HyperBraincommented, Apr 20, 2017

Is there any reason why you need to execute node in a root context via sudo? Is the node executable accessible in your user context too? Just try which nodejs. Additionally the executable should at least be available under the name “node” and not only “nodejs”.

0reactions
wghammockcommented, Feb 3, 2018

Having a similar issue with $ node --version v6.12.3

I’m gonna try installing nvm and switching node version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Installing serverless using NPM on ubuntu 20.04 Desktop
I got the solution, the problem is not in serverless framework but in npm and can be solved by cleaning the cache with...
Read more >
How to install Node.js v14.x on Ubuntu 17.04 - joshtronic.com
Follow these quick and easy steps to install Node Version Manager and Node.js v14.x on your EOL Ubuntu 17.04 system.
Read more >
How to install jq on Ubuntu 17.04 - YouTube
This video covers the installation involved with jq on Ubuntu 17.04. jq is an EPEL repository.For more explanation on this video: ...
Read more >
Install MongoDB on Ubuntu 17.04
The package is mongodb-org. The ubuntu repos have mongodb for ubuntu 17.10/artful, but only mongo db version 3.4.7, the packages are mongodb-*. So...
Read more >
Azure: Installing GNOME desktop and xRDP to access an ...
Ubuntu Server version 17.10 has been deployed from the Azure Marketplace; GNOME will be the chosen desktop interface; SSH access is available ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found