Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Official Linux binary for npm does not work #6292

Closed
boutell opened this issue Sep 30, 2013 · 12 comments
Closed

Official Linux binary for npm does not work #6292

boutell opened this issue Sep 30, 2013 · 12 comments

Comments

@boutell
Copy link

boutell commented Sep 30, 2013

The official Linux binaries arrive in a tarfile with a bin/ subdirectory. The README does not cover installation and there is no script for that purpose, so what comes next is an educated guess:

cp bin/* /usr/bin && mv lib/node_modules /usr/lib/node_modules

After doing this, "node" works fine, but "npm" always fails with the same error:

module.js:340
    throw err;
        ^
Error: Cannot find module 'npmlog'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /usr/bin/npm:19:11
    at Object.<anonymous> (/usr/bin/npm:87:3)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Note that npmlog does exist in /usr/lib/node_modules/npm/node_modules/npmlog.

There are references to the issue in stackoverflow, which everyone eventually resolves by installing from source. That worked for us too, but having broken npm binaries available on nodejs.org seems worse than having no binaries at all in terms of sharing the glory of node with the masses.

Thanks!

@boutell
Copy link
Author

boutell commented Sep 30, 2013

Sorry, my server is:

Ubuntu 10.04.4 LTS
Linux server 2.6.32-042stab078.27 #1 SMP Mon Jul 1 20:48:07 MSK 2013 x86_64 GNU/Linux

bnoordhuis added a commit that referenced this issue Oct 1, 2013
lLnk to http://nodejs.org/download/ and add a short primer on how to
extract the tarballs.

Fixes #6292.
@bnoordhuis
Copy link
Member

I would chalk that down as a case of mismatched expectations but at any rate, I've added a note to the README in b7f36e1. Cheers.

@boutell
Copy link
Author

boutell commented Oct 1, 2013

Thanks. Scratching my head as to how my commands were not equivalent, apart from dtrace and the manpages, which shouldn't have been crucial as far as I can tell. (I tried your instructions on new ubuntu VMs with both /usr/local and /usr and they work fine both ways.)

Is the script that builds these binary tarballs in github somewhere? I'd like to take a stab at support for "make install" just doing the sensible thing (/usr/local).

@bnoordhuis
Copy link
Member

Is the script that builds these binary tarballs in github somewhere? I'd like to take a stab at support for "make install" just doing the sensible thing (/usr/local).

Well, make install does just that. You probably want the make binary target, see the Makefile for details.

@boutell
Copy link
Author

boutell commented Oct 1, 2013

There is no Makefile in the tarball you get when you download binaries.

root@tom-ubuntu-11:/usr/local/src# tar -zxf
~tom/Downloads/node-v0.10.20-linux-x86.tar.gz
root@tom-ubuntu-11:/usr/local/src# ls
node-v0.10.20-linux-x86
root@tom-ubuntu-11:/usr/local/src# cd node-v0.10.20-linux-x86/
root@tom-ubuntu-11:/usr/local/src/node-v0.10.20-linux-x86# ls
bin ChangeLog lib LICENSE README.md share

Am I missing something? It wouldn't surprise me if I were...

On Tue, Oct 1, 2013 at 2:40 AM, Ben Noordhuis notifications@github.comwrote:

I would chalk that down as a case of mismatched expectations but at any
rate, I've added a note to the README in b7f36e1b7f36e1.
Cheers.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6292#issuecomment-25428356
.

Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

@boutell
Copy link
Author

boutell commented Oct 1, 2013

To be clear, I am talking about improving the experience for those who
download the binaries by giving them a simple installation command which
they can discover by looking at what they just downloaded.

On Tue, Oct 1, 2013 at 10:37 AM, Tom Boutell tom@punkave.com wrote:

There is no Makefile in the tarball you get when you download binaries.

root@tom-ubuntu-11:/usr/local/src# tar -zxf
~tom/Downloads/node-v0.10.20-linux-x86.tar.gz
root@tom-ubuntu-11:/usr/local/src# ls
node-v0.10.20-linux-x86
root@tom-ubuntu-11:/usr/local/src# cd node-v0.10.20-linux-x86/
root@tom-ubuntu-11:/usr/local/src/node-v0.10.20-linux-x86# ls
bin ChangeLog lib LICENSE README.md share

Am I missing something? It wouldn't surprise me if I were...

On Tue, Oct 1, 2013 at 2:40 AM, Ben Noordhuis notifications@github.comwrote:

I would chalk that down as a case of mismatched expectations but at any
rate, I've added a note to the README in b7f36e1b7f36e1.
Cheers.


Reply to this email directly or view it on GitHubhttps://github.com//issues/6292#issuecomment-25428356
.

Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

@bnoordhuis
Copy link
Member

Oh, is that what you mean. I don't consider the current tarball packaging to be particularly broken. I gauge brokenness by the number of bug reports and this is literally the first time someone reported an issue. :-)

@boutell
Copy link
Author

boutell commented Oct 1, 2013

Stack Overflow threads about the binary installation issue seem to peter
out with "I installed from source, thanks, never mind." Since that works a
lot of folks probably just haven't bothered to figure out where to report
an issue.

Your addition to the README helps, thank you.

On Tue, Oct 1, 2013 at 10:48 AM, Ben Noordhuis notifications@github.comwrote:

Oh, is that what you mean. I don't consider the current tarball packaging
to be particularly broken. I gauge brokenness by the number of bug reports
and this is literally the first time someone reported an issue. :-)


Reply to this email directly or view it on GitHubhttps://github.com//issues/6292#issuecomment-25455772
.

Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

@Boniface22
Copy link

Guys i need help here am so stranded now!! How can i deplay the app

drive-grease@drivegrease-HP-630-Notebook-PC:~/Desktop/coursework$ heroku git:remote -app findalawyer
module.js:339
throw err;
^
Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at /home/drive-grease/.heroku/iojs-v2.0.0-linux-ia32/lib/node_modules/npm/bin/npm-cli.js:18:11
at Object. (/home/drive-grease/.heroku/iojs-v2.0.0-linux-ia32/lib/node_modules/npm/bin/npm-cli.js:75:3)
at Module._compile (module.js:431:26)
at Object.Module._extensions..js (module.js:449:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
ERROR: EOF
Installing plugin heroku-git... module.js:339
throw err;
^
Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at /home/drive-grease/.heroku/iojs-v2.0.0-linux-ia32/lib/node_modules/npm/bin/npm-cli.js:18:11
at Object. (/home/drive-grease/.heroku/iojs-v2.0.0-linux-ia32/lib/node_modules/npm/bin/npm-cli.js:75:3)
at Module._compile (module.js:431:26)
at Object.Module._extensions..js (module.js:449:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
ERROR: exit status 1
Usage: heroku COMMAND [--app APP] [command-specific-options]

Help topics, type "heroku help TOPIC" for more details:

heroku version # print the version
heroku plugins # manage plugins
heroku update # update heroku-cli

@cjihrig
Copy link

cjihrig commented May 8, 2015

@Boniface22 please try the mailing list or Stack Overflow. The issue tracker is for reporting bugs in Node core.

@Boniface22
Copy link

screenshot from 2015-05-09 14 39 12

Any help?

@boutell
Copy link
Author

boutell commented May 9, 2015

@Boniface22 you've been told once already: issues on this github repository are for bugs in the core of node, not for Heroku deployment tips. This problem has nothing to do with the core of node. Go research your problem on stackoverflow, Heroku's website, etc. You will not be answered here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants