Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-pre-gyp install --fallback-to-build fails #3121

Closed
thany opened this issue Jun 26, 2014 · 10 comments
Closed

node-pre-gyp install --fallback-to-build fails #3121

thany opened this issue Jun 26, 2014 · 10 comments

Comments

@thany
Copy link

thany commented Jun 26, 2014

I downloaded a fresh package, unzipped it. I had to install node & npm:

sudo apt-get install nodejs npm

Which is not in the documentation, btw. Then I did the rest from the directory where I unzipped ghost to:

npm install --production

As per the readme.md.

This is the result:

[...]
npm http 200 https://registry.npmjs.org/sax/-/sax-0.4.2.tgz
npm http 200 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz
npm http 200 https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz

> sqlite3@2.2.0 install /home/martijn/ghost/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

/usr/bin/env: node: No such file or directory
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! sqlite3@2.2.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! `sh "-c" "node-pre-gyp install --fallback-to-build"` failed with 127
npm ERR! 
npm ERR! Failed at the sqlite3@2.2.0 install script.
npm ERR! This is most likely a problem with the sqlite3 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--production"
npm ERR! cwd /home/martijn/ghost
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/martijn/ghost/npm-debug.log
npm ERR! not ok code 0

This is on Linux Mint with kernel 3.11. It's literally a default installation, except that everything is up-to-date.

@ErisDS
Copy link
Member

ErisDS commented Jun 26, 2014

Hi @thany welcome to Ghost's GitHub. We use this repo for tracking active issues with Ghost, it's not really a place to get installation support. For help with installing we have documentation at http://support.ghost.org, and a forum at http://ghost.org/forum.

@ErisDS ErisDS closed this as completed Jun 26, 2014
@thany
Copy link
Author

thany commented Jun 26, 2014

It's still an error. Either in the documentation, or in the program.

@halfdan
Copy link
Contributor

halfdan commented Jun 26, 2014

@thany It isn’t an error with Ghost, it is one with your setup. Please check whether you can start node with node or nodejs. If only the latter works you need to alias node to nodejs as that is what the sqlite3 install expects.

@thany
Copy link
Author

thany commented Jun 26, 2014

Also, I don't see a way on the forum to start a new topic anywhere. That kinda puts me off using it, to be brutally honest.

@thany
Copy link
Author

thany commented Jun 26, 2014

@halfdan then why can the installer not check for node or nodejs and use whatever works? Sure, if that's the solution, then this is a problem worth reporting as an issue, and there would be no reason to slap me on the wrist to taking the effort to report a problem in your software... Or documentation!

@halfdan
Copy link
Contributor

halfdan commented Jun 26, 2014

Again. This is not an issue with Ghost. The installer is npm, which is a
dependency manager for node. This however is most likely an issue with the
sqlite3 package on your platform. We can't do anything about that.
On 26 Jun 2014 16:59, "thany" notifications@github.com wrote:

@halfdan https://github.com/halfdan then why can the installer not
check for node or nodejs and use whatever works? Sure, if that's the
solution, then this is a problem worth reporting as an issue, and there
would be no reason to slap me on the wrist to taking the effort to report a
problem in your software...


Reply to this email directly or view it on GitHub
#3121 (comment).

@thany
Copy link
Author

thany commented Jun 26, 2014

Then the issue is in the documentation. One step is obviously missing:

cd /usr/bin
sudo ln nodejs node

Add that just after the step that says to install node, and done.

@halfdan
Copy link
Contributor

halfdan commented Jun 26, 2014

@thany This is very specific to your linux distribution - all other linux distributions I know of have the node binary as node and not as nodejs.

@ErisDS
Copy link
Member

ErisDS commented Jun 26, 2014

@thany our install guide says to install Node as per the instructions for the package manager you are using: http://support.ghost.org/installing-ghost-linux/, every linux distro is different, so we don't document all the steps.

If you don't see buttons to create a topic on the forum, then you probably haven't verified your email address.

@shennan
Copy link

shennan commented Feb 19, 2015

@halfdan @ErisDS

I don't see a problem with listing some gotchas for certain distributions. If it's a known issue with an easy fix, it can save people half an hour or so. I can see where @thany is coming from.

I also fixed this by soft linking node with a non-existent nodejs on a debian distribution:

$ ln -s /usr/local/bin/node /usr/bin/nodejs

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

No branches or pull requests

4 participants