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

npm install email-templates fails #42

Closed
steve-lorimer opened this issue Dec 11, 2013 · 37 comments
Closed

npm install email-templates fails #42

steve-lorimer opened this issue Dec 11, 2013 · 37 comments

Comments

@steve-lorimer
Copy link

I can't install email-templates via npm

I'm using a prefixed install of node v0.10.22 on fedora x86-64 linux.

verbose npm install output is here: http://www.filedropper.com/out_1
npm-debug.log here: http://www.filedropper.com/npm-debug

terse output below:

npm WARN package.json jobsearch@0.0.0 No description
npm WARN package.json jobsearch@0.0.0 No repository field.
npm WARN package.json jobsearch@0.0.0 No README data
npm WARN package.json crypto@0.0.3 crypto is also the name of a node core module.
npm http GET https://registry.npmjs.org/email-templates
npm http 304 https://registry.npmjs.org/email-templates
npm http GET https://registry.npmjs.org/async/0.1.22
npm http GET https://registry.npmjs.org/underscore/1.3.3
npm http GET https://registry.npmjs.org/ejs/0.8.3
npm http GET https://registry.npmjs.org/juice
npm http 304 https://registry.npmjs.org/underscore/1.3.3
npm http 304 https://registry.npmjs.org/async/0.1.22
npm http 304 https://registry.npmjs.org/juice
npm http 304 https://registry.npmjs.org/ejs/0.8.3
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/superagent
npm http GET https://registry.npmjs.org/batch
npm http GET https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/slick
npm http 304 https://registry.npmjs.org/batch
npm http 304 https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/superagent
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/slick
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/qs/0.6.5
npm http GET https://registry.npmjs.org/formidable/1.0.9
npm http GET https://registry.npmjs.org/mime/1.2.5
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/emitter-component/1.0.0
npm http GET https://registry.npmjs.org/cssstyle
npm http GET https://registry.npmjs.org/htmlparser
npm http GET https://registry.npmjs.org/nwmatcher
npm http GET https://registry.npmjs.org/cookiejar/1.3.0
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/qs/0.6.5
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/formidable/1.0.9
npm http 304 https://registry.npmjs.org/emitter-component/1.0.0
npm http 304 https://registry.npmjs.org/mime/1.2.5
npm http 304 https://registry.npmjs.org/cssstyle
npm http 304 https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/cookiejar/1.3.0
npm http 304 https://registry.npmjs.org/nwmatcher
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/tough-cookie
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/mime

contextify@0.1.6 install /mnt/raid/src/web/jobSearch/node_modules/email-templates/node_modules/juice/node_modules/jsdom/node_modules/contextify
node-gyp rebuild

make: Entering directory /mnt/raid/src/web/jobSearch/node_modules/email-templates/node_modules/juice/node_modules/jsdom/node_modules/contextify/build' CXX(target) Release/obj.target/contextify/src/contextify.o SOLINK_MODULE(target) Release/obj.target/contextify.node flock: ./Release/linker.lock: Bad file descriptor make: *** [Release/obj.target/contextify.node] Error 65 make: Leaving directory/mnt/raid/src/web/jobSearch/node_modules/email-templates/node_modules/juice/node_modules/jsdom/node_modules/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.9-200.fc19.x86_64
gyp ERR! command "node" "/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/raid/src/web/jobSearch/node_modules/email-templates/node_modules/juice/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.11.0
gyp ERR! not ok
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/tough-cookie
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/aws-sign2
npm http 304 https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/punycode
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/hoek
npm ERR! contextify@0.1.6 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.6 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.9-200.fc19.x86_64
npm ERR! command "/mnt/raid/local/bin/node" "/mnt/raid/local/bin/npm" "install" "email-templates"
npm ERR! cwd /mnt/raid/src/web/jobSearch
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/punycode
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /mnt/raid/src/web/jobSearch/npm-debug.log
npm ERR! not ok code 0

@jfroffice
Copy link

+1

getting the same error message on node v0.10.22

@jfroffice
Copy link

Fixed

Check the prerequis https://github.com/TooTallNate/node-gyp

I should add g++ on Unix

@niftylettuce
Copy link
Collaborator

So all you need is g++ package installed on your system to resolve this? Can we mark as closed? @jfroffice @skeganga

@steve-lorimer
Copy link
Author

I have g++, doesn't work.

On 13 Dec 2013, at 8:03 am, niftylettuce notifications@github.com wrote:

So all you need is g++ package installed on your system to resolve this?
Can we mark as closed? @jfroffice https://github.com/jfroffice
@skegangahttps://github.com/skeganga


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

@niftylettuce
Copy link
Collaborator

Installs fine for me. Here is log output. https://gist.github.com/niftylettuce/a900699b8d29879f3c91

@niftylettuce
Copy link
Collaborator

@skeganga What version of Node, NPM, and what operating system and version are you on?

@steve-lorimer
Copy link
Author

$ node --version
v0.10.22
$ npm --version
1.3.14
$ uname -a
Linux fedora 3.11.9-200.fc19.x86_64 #1 SMP Wed Nov 20 21:22:24 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux

On 13 December 2013 08:22, niftylettuce notifications@github.com wrote:

@skeganga https://github.com/skeganga What version of Node, NPM, and
what operating system and version are you on?


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

@niftylettuce niftylettuce reopened this Dec 12, 2013
@niftylettuce
Copy link
Collaborator

@skeganga have you all the dependencies here? https://github.com/TooTallNate/node-gyp why not just try installing node-gyp in a blank dir to see if node-gyp is the issue? you could also try installing contextify by itself too.

mkdir some-dir
cd some-dir
npm init
npm install -S node-gyp
npm install -S contextify

@steve-lorimer
Copy link
Author

Seems like it might be contextify

$ npm install node-gyp - works fine
$ npm install contextify - fails

npm http GET https://registry.npmjs.org/contextify
npm http 200 https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/bindings
npm http 200 https://registry.npmjs.org/bindings

contextify@0.1.6 install
/mnt/raid/src/web/jobSearch/node_modules/contextify
node-gyp rebuild

make: Entering directory
/mnt/raid/src/web/jobSearch/node_modules/contextify/build' CXX(target) Release/obj.target/contextify/src/contextify.o SOLINK_MODULE(target) Release/obj.target/contextify.node flock: ./Release/linker.lock: Bad file descriptor make: *** [Release/obj.target/contextify.node] Error 65 make: Leaving directory /mnt/raid/src/web/jobSearch/node_modules/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(child_process.js:789:12)
gyp ERR! System Linux 3.11.9-200.fc19.x86_64
gyp ERR! command "node"
"/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd /mnt/raid/src/web/jobSearch/node_modules/contextify
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.11.0
gyp ERR! not ok
npm ERR! contextify@0.1.6 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.6 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.9-200.fc19.x86_64
npm ERR! command "/mnt/raid/local/bin/node" "/mnt/raid/local/bin/npm"
"install" "contextify"
npm ERR! cwd /mnt/raid/src/web/jobSearch
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /mnt/raid/src/web/jobSearch/npm-debug.log
npm ERR! not ok code 0

On 13 December 2013 08:27, niftylettuce notifications@github.com wrote:

@skeganga https://github.com/skeganga have you all the dependencies
here? https://github.com/TooTallNate/node-gyp why not just try installing
node-gyp in a blank dir to see if node-gyp is the issue? you could also try
installing contextify by itself too.

mkdir some-dircd some-dir
npm init
npm install -S node-gyp
npm install -S contextify


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

@niftylettuce
Copy link
Collaborator

@skeganga can you manually try using contextify 0.1.5 instead of 0.1.6? i've checked on jsdom and contextify github issues and they both have tons of reported issues like this.

@steve-lorimer
Copy link
Author

$ npm install contextify@0.1.5

npm http GET https://registry.npmjs.org/contextify/0.1.5
npm http 304 https://registry.npmjs.org/contextify/0.1.5
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

contextify@0.1.5 install
/mnt/raid/src/web/jobSearch/node_modules/contextify
node-gyp rebuild

make: Entering directory
/mnt/raid/src/web/jobSearch/node_modules/contextify/build' CXX(target) Release/obj.target/contextify/src/contextify.o SOLINK_MODULE(target) Release/obj.target/contextify.node flock: ./Release/linker.lock: Bad file descriptor make: *** [Release/obj.target/contextify.node] Error 65 make: Leaving directory /mnt/raid/src/web/jobSearch/node_modules/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(child_process.js:789:12)
gyp ERR! System Linux 3.11.9-200.fc19.x86_64
gyp ERR! command "node"
"/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd /mnt/raid/src/web/jobSearch/node_modules/contextify
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.11.0
gyp ERR! not ok
npm ERR! contextify@0.1.5 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.5 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.9-200.fc19.x86_64
npm ERR! command "/mnt/raid/local/bin/node" "/mnt/raid/local/bin/npm"
"install" "contextify@0.1.5"
npm ERR! cwd /mnt/raid/src/web/jobSearch
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /mnt/raid/src/web/jobSearch/npm-debug.log
npm ERR! not ok code 0

On 13 December 2013 08:44, niftylettuce notifications@github.com wrote:

@skeganga https://github.com/skeganga can you manually try using
contextify 0.1.5 instead of 0.1.6? i've checked on jsdom and contextify
github issues and they both have tons of reported issues like this.


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

@niftylettuce
Copy link
Collaborator

any luck with your search? I'm not sure if it's a Fedora specific issue or
perhaps you need to rebuild node? Does node have all dependencies listed?

On Thu, Dec 12, 2013 at 4:47 PM, skeganga notifications@github.com wrote:

$ npm install contextify@0.1.5

npm http GET https://registry.npmjs.org/contextify/0.1.5
npm http 304 https://registry.npmjs.org/contextify/0.1.5
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

contextify@0.1.5 install
/mnt/raid/src/web/jobSearch/node_modules/contextify
node-gyp rebuild

make: Entering directory
/mnt/raid/src/web/jobSearch/node_modules/contextify/build' CXX(target) Release/obj.target/contextify/src/contextify.o SOLINK_MODULE(target) Release/obj.target/contextify.node flock: ./Release/linker.lock: Bad file descriptor make: *** [Release/obj.target/contextify.node] Error 65 make: Leaving directory /mnt/raid/src/web/jobSearch/node_modules/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)

gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(child_process.js:789:12)
gyp ERR! System Linux 3.11.9-200.fc19.x86_64
gyp ERR! command "node"
"/mnt/raid/local/node-v0.10.22-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"

"rebuild"
gyp ERR! cwd /mnt/raid/src/web/jobSearch/node_modules/contextify
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.11.0
gyp ERR! not ok
npm ERR! contextify@0.1.5 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.5 install script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls contextify
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.9-200.fc19.x86_64
npm ERR! command "/mnt/raid/local/bin/node" "/mnt/raid/local/bin/npm"
"install" "contextify@0.1.5"
npm ERR! cwd /mnt/raid/src/web/jobSearch
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /mnt/raid/src/web/jobSearch/npm-debug.log
npm ERR! not ok code 0

On 13 December 2013 08:44, niftylettuce notifications@github.com wrote:

@skeganga https://github.com/skeganga can you manually try using
contextify 0.1.5 instead of 0.1.6? i've checked on jsdom and contextify
github issues and they both have tons of reported issues like this.


Reply to this email directly or view it on GitHub<
https://github.com/niftylettuce/node-email-templates/issues/42#issuecomment-30465028>

.


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

@jfroffice
Copy link

try

make -v
g++ -v

@niftylettuce
Copy link
Collaborator

@skeganga did you see @jfroffice comment? #42 (comment)

@steve-lorimer
Copy link
Author

$ make -v
GNU Make 3.82
$ g++ -v
gcc version 4.8.2 20131017 (Red Hat 4.8.2-1) (GCC)

@steve-lorimer
Copy link
Author

Should Contextify be being used anyway? I see a comment in the Contextify issues:

"As of node 0.11.7, Contextify has basically been merged into node itself. Can you use the built-in vm module instead?"

brianmcd/contextify#91 (comment)

@steve-lorimer
Copy link
Author

In the spirit of diagnosing the issue, this is more-or-less where I'm at:

$ npm install contextify # fails

I downloaded the source:

$ git clone https://github.com/brianmcd/contextify.git
$ cd contextify
$ make # fails

Contextify makefile uses node-waf which has been replaced with node-gyp (as far as I can tell)

$ npm install -g node-gyp
$ sed -i s/node-waf/node-gyp/g Makefile # change makefile to use node-gyp
$ sed -i s/distclean/clean/g Makefile # change clean target to use node-gyp clean

$ make
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.22 | linux | x64
gyp info spawn python
gyp info spawn args [
'/mnt/raid/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/mnt/raid/src/web/contextify/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args
'/mnt/raid/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/steve/.node-gyp/0.10.22/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/steve/.node-gyp/0.10.22',
gyp info spawn args '-Dmodule_root_dir=/mnt/raid/src/web/contextify',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory /mnt/raid/src/web/contextify/build' CXX(target) Release/obj.target/contextify/src/contextify.o SOLINK_MODULE(target) Release/obj.target/contextify.node flock: ./Release/linker.lock: Bad file descriptor make: *** [Release/obj.target/contextify.node] Error 65 make: Leaving directory/mnt/raid/src/web/contextify/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/mnt/raid/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(child_process.js:789:12)
gyp ERR! System Linux 3.11.9-200.fc19.x86_64
gyp ERR! command "node" "/mnt/raid/local/bin/node-gyp" "configure" "build"
gyp ERR! cwd /mnt/raid/src/web/contextify
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok

@steve-lorimer
Copy link
Author

Fixed!

It is an issue when building on nfs mounts.

Can be solved by setting LINK=g++ in your environment

LINK=g++ npm install email-templates

or

export LINK=g++
npm install email-templates

Found the sugar here: nodejs/node-gyp#147 (comment)

@niftylettuce
Copy link
Collaborator

Great!!!!!! Awesome!!!!!
On Dec 16, 2013 1:09 AM, "skeganga" notifications@github.com wrote:

Closed #42#42
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/42
.

@mderazon
Copy link

@skeganga this didn't help for me, still crashing when installing.

The weird thing is that when I do npm install right after that it succeeds (even without export LINK=g++)

this is environment dependent, running on my MBA it works fine, running on Ubuntu in AWS instance, it fails.
running node v0.10.24
Any other clues what's causing this ?

@niftylettuce
Copy link
Collaborator

@mderazon not sure, how did you install node on your Ubuntu AWS instance? did you install all dependencies?

@mderazon
Copy link

add-apt-repository -y ppa:chris-lea/node.js
apt-get -y install nodejs

which dependencies do you have in mind ?

@niftylettuce
Copy link
Collaborator

that's fine. you said npm install email-templates succeeds, so what is the
issue then?...

On Thu, Dec 26, 2013 at 1:24 PM, Michael Derazon
notifications@github.comwrote:

add-apt-repository -y ppa:chris-lea/node.js
apt-get -y install nodejs

which dependencies do you have in mind ?


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

@jfroffice
Copy link

any error stack ?

Could you give version when you execute following command

uname -r
g++ -v
gcc -v

@mderazon
Copy link

@niftylettuce installing email-templates fails on first attempt, then on second attempt it succeeds

@jfroffice sure
here's the error stack

Dec 26 14:09:43 admin kernel:  [1082652.491795] Installing npm modules
Dec 26 14:09:44 admin kernel:  [1082652.892052] npm WARN package.json dateformat@1.0.2-1.2.3 No repository field.
Dec 26 14:09:44 admin kernel:  [1082652.896442] npm WARN package.json mustache@0.4.0 No repository field.
Dec 26 14:09:46 admin kernel:  [1082654.994388] npm http GET https://registry.npmjs.org/memory-cache/0.0.4
Dec 26 14:09:46 admin kernel:  [1082655.009522] npm http GET https://registry.npmjs.org/mongojs/0.4.5
Dec 26 14:09:46 admin kernel:  [1082655.014514] npm http GET https://registry.npmjs.org/nodemailer/0.5.3
Dec 26 14:09:46 admin kernel:  [1082655.018073] npm http GET https://registry.npmjs.org/email-templates/0.1.0
Dec 26 14:09:48 admin kernel:  [1082657.022728] npm http 304 https://registry.npmjs.org/email-templates/0.1.0
Dec 26 14:09:48 admin kernel:  [1082657.030956] npm http 304 https://registry.npmjs.org/nodemailer/0.5.3
Dec 26 14:09:48 admin kernel:  [1082657.045943] npm http 304 https://registry.npmjs.org/memory-cache/0.0.4
Dec 26 14:09:48 admin kernel:  [1082657.052245] npm http 304 https://registry.npmjs.org/mongojs/0.4.5
Dec 26 14:09:48 admin kernel:  [1082657.165807] npm http GET https://registry.npmjs.org/common
Dec 26 14:09:48 admin kernel:  [1082657.230811] npm http GET https://registry.npmjs.org/mongodb
Dec 26 14:09:48 admin kernel:  [1082657.247005] npm http GET https://registry.npmjs.org/underscore/1.3.3
Dec 26 14:09:48 admin kernel:  [1082657.250999] npm http GET https://registry.npmjs.org/ejs/0.8.3
Dec 26 14:09:48 admin kernel:  [1082657.268104] npm http GET https://registry.npmjs.org/juice
Dec 26 14:09:48 admin kernel:  [1082657.319565] npm http GET https://registry.npmjs.org/mailcomposer
Dec 26 14:09:48 admin kernel:  [1082657.339631] npm http GET https://registry.npmjs.org/simplesmtp
Dec 26 14:09:49 admin kernel:  [1082658.014168] npm http 304 https://registry.npmjs.org/common
Dec 26 14:09:49 admin kernel:  [1082658.062113] npm http 304 https://registry.npmjs.org/ejs/0.8.3
Dec 26 14:09:49 admin kernel:  [1082658.066201] npm http 304 https://registry.npmjs.org/mongodb
Dec 26 14:09:49 admin kernel:  [1082658.097274] npm http 304 https://registry.npmjs.org/underscore/1.3.3
Dec 26 14:09:49 admin kernel:  [1082658.098407] npm http 304 https://registry.npmjs.org/juice
Dec 26 14:09:49 admin kernel:  [1082658.152465] npm http 304 https://registry.npmjs.org/mailcomposer
Dec 26 14:09:49 admin kernel:  [1082658.196766] npm http 304 https://registry.npmjs.org/simplesmtp
Dec 26 14:09:49 admin kernel:  [1082658.555647] npm http GET https://registry.npmjs.org/cssom
Dec 26 14:09:49 admin kernel:  [1082658.562509] npm http GET https://registry.npmjs.org/superagent
Dec 26 14:09:49 admin kernel:  [1082658.570704] npm http GET https://registry.npmjs.org/commander
Dec 26 14:09:49 admin kernel:  [1082658.574003] npm http GET https://registry.npmjs.org/batch
Dec 26 14:09:49 admin kernel:  [1082658.608472] npm http GET https://registry.npmjs.org/jsdom
Dec 26 14:09:49 admin kernel:  [1082658.613748] npm http GET https://registry.npmjs.org/slick
Dec 26 14:09:49 admin kernel:  [1082658.695534] npm http GET https://registry.npmjs.org/rai
Dec 26 14:09:49 admin kernel:  [1082658.705926] npm http GET https://registry.npmjs.org/xoauth2
Dec 26 14:09:49 admin kernel:  [1082658.725085] npm http GET https://registry.npmjs.org/he
Dec 26 14:09:49 admin kernel:  [1082658.727832] npm http GET https://registry.npmjs.org/punycode
Dec 26 14:09:49 admin kernel:  [1082658.729720] npm http GET https://registry.npmjs.org/dkim-signer
Dec 26 14:09:49 admin kernel:  [1082658.736271] npm http GET https://registry.npmjs.org/mimelib
Dec 26 14:09:49 admin kernel:  [1082658.737504] npm http GET https://registry.npmjs.org/mime/1.2.9
Dec 26 14:09:50 admin kernel:  [1082658.883866] npm http GET https://registry.npmjs.org/bson/0.2.5
Dec 26 14:09:50 admin kernel:  [1082658.891835] npm http GET https://registry.npmjs.org/kerberos/0.0.3
Dec 26 14:09:50 admin kernel:  [1082659.374229] npm http 304 https://registry.npmjs.org/cssom
Dec 26 14:09:50 admin kernel:  [1082659.390350] npm http 304 https://registry.npmjs.org/batch
Dec 26 14:09:50 admin kernel:  [1082659.414000] npm http 304 https://registry.npmjs.org/commander
Dec 26 14:09:50 admin kernel:  [1082659.447127] npm http 304 https://registry.npmjs.org/jsdom
Dec 26 14:09:50 admin kernel:  [1082659.507789] npm http 304 https://registry.npmjs.org/slick
Dec 26 14:09:50 admin kernel:  [1082659.527618] npm http 304 https://registry.npmjs.org/rai
Dec 26 14:09:50 admin kernel:  [1082659.555869] npm http 304 https://registry.npmjs.org/xoauth2
Dec 26 14:09:50 admin kernel:  [1082659.586062] npm http 304 https://registry.npmjs.org/he
Dec 26 14:09:50 admin kernel:  [1082659.648609] npm http 304 https://registry.npmjs.org/punycode
Dec 26 14:09:50 admin kernel:  [1082659.663077] npm http 304 https://registry.npmjs.org/dkim-signer
Dec 26 14:09:50 admin kernel:  [1082659.694079] npm http 304 https://registry.npmjs.org/mimelib
Dec 26 14:09:50 admin kernel:  [1082659.726294] npm http 304 https://registry.npmjs.org/mime/1.2.9
Dec 26 14:09:50 admin kernel:  [1082659.785213] npm http 304 https://registry.npmjs.org/bson/0.2.5
Dec 26 14:09:51 admin kernel:  [1082659.797124] npm http 304 https://registry.npmjs.org/kerberos/0.0.3
Dec 26 14:09:51 admin kernel:  [1082659.915412] npm http GET https://registry.npmjs.org/encoding
Dec 26 14:09:51 admin kernel:  [1082659.944492] npm http GET https://registry.npmjs.org/addressparser
Dec 26 14:09:51 admin kernel:  [1082660.051316] 
Dec 26 14:09:51 admin kernel:  [1082660.051319] > kerberos@0.0.3 install /var/www/node_modules/cups-common/node_modules/mongojs/node_modules/mongodb/node_modules/kerberos
Dec 26 14:09:51 admin kernel:  [1082660.051321] > (node-gyp rebuild 2> builderror.log) || (exit 0)
Dec 26 14:09:51 admin kernel:  [1082660.051321] 
Dec 26 14:09:51 admin kernel:  [1082660.349353] npm http 200 https://registry.npmjs.org/superagent
Dec 26 14:09:51 admin kernel:  [1082660.374313] 
Dec 26 14:09:51 admin kernel:  [1082660.374316] > bson@0.2.5 install /var/www/node_modules/cups-common/node_modules/mongojs/node_modules/mongodb/node_modules/bson
Dec 26 14:09:51 admin kernel:  [1082660.374318] > (node-gyp rebuild 2> builderror.log) || (exit 0)
Dec 26 14:09:51 admin kernel:  [1082660.374319] 
Dec 26 14:09:52 admin kernel:  [1082660.657683] npm http GET https://registry.npmjs.org/keypress
Dec 26 14:09:52 admin kernel:  [1082660.764937] npm http GET https://registry.npmjs.org/emitter-component/1.0.0
Dec 26 14:09:52 admin kernel:  [1082660.772351] npm http 304 https://registry.npmjs.org/encoding
Dec 26 14:09:52 admin kernel:  [1082660.781698] npm http 304 https://registry.npmjs.org/addressparser
Dec 26 14:09:52 admin kernel:  [1082660.783410] npm http GET https://registry.npmjs.org/mime/1.2.5
Dec 26 14:09:52 admin kernel:  [1082660.788811] npm http GET https://registry.npmjs.org/methods/0.0.1
Dec 26 14:09:52 admin kernel:  [1082660.794312] npm http GET https://registry.npmjs.org/debug
Dec 26 14:09:52 admin kernel:  [1082660.798096] npm http GET https://registry.npmjs.org/qs/0.6.5
Dec 26 14:09:52 admin kernel:  [1082660.799412] npm http GET https://registry.npmjs.org/formidable/1.0.9
Dec 26 14:09:52 admin kernel:  [1082660.800621] npm http GET https://registry.npmjs.org/cookiejar/1.3.0
Dec 26 14:09:52 admin kernel:  [1082660.885870] npm http GET https://registry.npmjs.org/iconv-lite
Dec 26 14:09:52 admin kernel:  [1082660.907726] npm http GET https://registry.npmjs.org/htmlparser
Dec 26 14:09:52 admin kernel:  [1082660.909195] npm http GET https://registry.npmjs.org/nwmatcher
Dec 26 14:09:52 admin kernel:  [1082660.910494] npm http GET https://registry.npmjs.org/cssstyle
Dec 26 14:09:52 admin kernel:  [1082660.911847] npm http GET https://registry.npmjs.org/contextify
Dec 26 14:09:52 admin kernel:  [1082661.465971] npm http 304 https://registry.npmjs.org/keypress
Dec 26 14:09:52 admin kernel:  [1082661.593798] npm http 304 https://registry.npmjs.org/emitter-component/1.0.0
Dec 26 14:09:52 admin kernel:  [1082661.598672] npm http 304 https://registry.npmjs.org/debug
Dec 26 14:09:52 admin kernel:  [1082661.600256] npm http 304 https://registry.npmjs.org/qs/0.6.5
Dec 26 14:09:52 admin kernel:  [1082661.619198] npm http 304 https://registry.npmjs.org/methods/0.0.1
Dec 26 14:09:52 admin kernel:  [1082661.620589] npm http 304 https://registry.npmjs.org/mime/1.2.5
Dec 26 14:09:52 admin kernel:  [1082661.734200] npm http 304 https://registry.npmjs.org/cookiejar/1.3.0
Dec 26 14:09:52 admin kernel:  [1082661.735187] npm http 304 https://registry.npmjs.org/iconv-lite
Dec 26 14:09:52 admin kernel:  [1082661.736421] npm http 304 https://registry.npmjs.org/formidable/1.0.9
Dec 26 14:09:52 admin kernel:  [1082661.759274] npm http 304 https://registry.npmjs.org/nwmatcher
Dec 26 14:09:52 admin kernel:  [1082661.760405] npm http 304 https://registry.npmjs.org/htmlparser
Dec 26 14:09:53 admin kernel:  [1082661.868410] npm http 304 https://registry.npmjs.org/cssstyle
Dec 26 14:09:53 admin kernel:  [1082661.871182] npm http 304 https://registry.npmjs.org/contextify
Dec 26 14:09:53 admin kernel:  [1082662.069804] npm http GET https://registry.npmjs.org/bindings
Dec 26 14:09:54 admin kernel:  [1082662.913982] npm http 304 https://registry.npmjs.org/bindings
Dec 26 14:09:54 admin kernel:  [1082662.946961] 
Dec 26 14:09:54 admin kernel:  [1082662.946964] > contextify@0.1.6 install /var/www/node_modules/cups-common/node_modules/email-templates/node_modules/juice/node_modules/jsdom/node_modules/contextify
Dec 26 14:09:54 admin kernel:  [1082662.946965] > node-gyp rebuild
Dec 26 14:09:54 admin kernel:  [1082662.946966] 
Dec 26 14:09:54 admin kernel:  [1082663.080033] 
Dec 26 14:09:54 admin kernel:  [1082663.080317] /usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:54
Dec 26 14:09:54 admin kernel:  [1082663.080540]     throw new Error(
Dec 26 14:09:54 admin kernel:  [1082663.080544]           ^
Dec 26 14:09:54 admin kernel:  [1082663.082664] Error: node-gyp requires that the user's home directory is specified in either of the environmental variables HOME or USERPROFILE
Dec 26 14:09:54 admin kernel:  [1082663.082666]     at new Gyp (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:54:11)
Dec 26 14:09:54 admin kernel:  [1082663.082667]     at gyp (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:43:10)
Dec 26 14:09:54 admin kernel:  [1082663.082668]     at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js:20:12)
Dec 26 14:09:54 admin kernel:  [1082663.082669]     at Module._compile (module.js:456:26)
Dec 26 14:09:54 admin kernel:  [1082663.082670]     at Object.Module._extensions..js (module.js:474:10)
Dec 26 14:09:54 admin kernel:  [1082663.082671]     at Module.load (module.js:356:32)
Dec 26 14:09:54 admin kernel:  [1082663.082672]     at Function.Module._load (module.js:312:12)
Dec 26 14:09:54 admin kernel:  [1082663.082672]     at Function.Module.runMain (module.js:497:10)
Dec 26 14:09:54 admin kernel:  [1082663.082673]     at startup (node.js:119:16)
Dec 26 14:09:54 admin kernel:  [1082663.082674]     at node.js:901:3
Dec 26 14:09:54 admin kernel:  [1082663.241283] npm ERR! contextify@0.1.6 install: `node-gyp rebuild`
Dec 26 14:09:54 admin kernel:  [1082663.241503] npm ERR! Exit status 8
Dec 26 14:09:54 admin kernel:  [1082663.241600] npm ERR! 
Dec 26 14:09:54 admin kernel:  [1082663.241656] npm ERR! Failed at the contextify@0.1.6 install script.
Dec 26 14:09:54 admin kernel:  [1082663.241712] npm ERR! This is most likely a problem with the contextify package,
Dec 26 14:09:54 admin kernel:  [1082663.241771] npm ERR! not with npm itself.
Dec 26 14:09:54 admin kernel:  [1082663.241827] npm ERR! Tell the author that this fails on your system:
Dec 26 14:09:54 admin kernel:  [1082663.241893] npm ERR!     node-gyp rebuild
Dec 26 14:09:54 admin kernel:  [1082663.241948] npm ERR! You can get their info via:
Dec 26 14:09:54 admin kernel:  [1082663.242021] npm ERR!     npm owner ls contextify
Dec 26 14:09:54 admin kernel:  [1082663.242200] npm ERR! There is likely additional logging output above.
Dec 26 14:09:54 admin kernel:  [1082663.242299] 
Dec 26 14:09:54 admin kernel:  [1082663.242362] npm ERR! System Linux 3.2.0-25-virtual
Dec 26 14:09:54 admin kernel:  [1082663.243176] npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
Dec 26 14:09:54 admin kernel:  [1082663.243266] npm ERR! cwd /var/www
Dec 26 14:09:54 admin kernel:  [1082663.243353] npm ERR! node -v v0.10.22
Dec 26 14:09:54 admin kernel:  [1082663.243438] npm ERR! npm -v 1.3.14
Dec 26 14:09:54 admin kernel:  [1082663.243631] npm ERR! code ELIFECYCLE
Dec 26 14:09:54 admin kernel:  [1082663.327496] npm ERR! 
Dec 26 14:09:54 admin kernel:  [1082663.327627] npm ERR! Additional logging details can be found in:
Dec 26 14:09:54 admin kernel:  [1082663.327703] npm ERR!     /var/www/npm-debug.log
Dec 26 14:09:54 admin kernel:  [1082663.327822] npm ERR! not ok code 0

here's the output for the rest :

ubuntu@admin:~$ uname -r
3.2.0-25-virtual

ubuntu@admin:~$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

ubuntu@admin:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

@mderazon
Copy link

I am running my server with upstart and my startup script is the following : (it runs as root)

# create /etc/init/paas.conf
echo 'start on runlevel [2345]
stop on runlevel [06]

respawn

pre-start script
    exec >/dev/kmsg 2>&1
    REPO=git@github.com:xxx/yyy
    mkdir -p /var/log
    mkdir -p /var/www
    echo "Fetching app from $REPO"
    girror $REPO /var/www # this just fetches a bare repo from $REPO
    if [ -f /var/www/package.json ]; then
        echo "Installing npm modules"
        cd /var/www
        npm install
    fi
    if [ -f /var/www/bower.json ]; then
        echo "Installing bower dependencies"
        cd /var/www
        bower install --allow-root -f
    fi
end script

post-stop script
    exec >/dev/kmsg 2>&1
    echo "stopped"
end script

script
    exec >/dev/kmsg 2>&1
    export NODE_ENV=production
    export port=80
    echo "Starting app.js on port 80"
    cd /var/www
    node app.js
end script' > /etc/init/paas.conf

basically, whenever ubuntu detects the process has terminated for any reason, it fetches the code from github, does npm install and and respawns it.

npm install phase is where it fails due to the error I mentioned. The weird part is if I manuall do a sudo npm install it succeeds.

@jfroffice
Copy link

Seems to be documented error.
nodejs/node-gyp#21

try to make something like

export HOME=/home/ubuntu

in your script

@mderazon
Copy link

IT WORKED :)

@jfroffice this did the trick, I will add it to my startup script.

Don't exactly know what's the use of this library in node-email-templates but I think that if using it can be avoided it will be a blessing.

Anyway, thanks ! and thank you @niftylettuce 👍

@blowsie
Copy link

blowsie commented Sep 5, 2014

Anyone have a solution for windows?

@jeduan
Copy link
Contributor

jeduan commented Sep 5, 2014

@blowsie this issue is closed, maybe it would be a better idea to open a new one, with versions of node, npm, email-templates and the stack trace of the error you're getting (if any)

@niftylettuce
Copy link
Collaborator

@blowsie I'd recommend to not use windows at all with Node/programming. Get an Ubuntu Vagrant/VirtualBox image set up and just use that to run your node app.

@jfroffice
Copy link

-1

@niftylettuce
Copy link
Collaborator

@jfroffice why -1?

@jfroffice
Copy link

I think NodeJS power is to work on everything common platform

@niftylettuce
Copy link
Collaborator

@jfroffice when developing you should mirror your production environment I'd think -- which means you should use some *nix based platform. otherwise if you dev on windows you may get different results in production when hosted somewhere, usually all hosts/vps are *nix based since that's industry standard.

@blowsie
Copy link

blowsie commented Sep 8, 2014

@niftylettuce Thanks, but I disagree, there are plenty of windows + node environments around. Including cloud based services like azure.

@niftylettuce
Copy link
Collaborator

@blowsie I don't support Windows with any of my projects and not many in the Node community do. The standard is to use Vagrant/VirtualBox with an Ubuntu instance if you are on Windows, otherwise you run into constant issues. You need to use Cygbin for instance just to get a *nix like command line... it's not worth it IMO.

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

6 participants