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

Failed to build in Heroku (node v6.10.2) #298

Open
OussamaRomdhane opened this issue Apr 5, 2017 · 8 comments
Open

Failed to build in Heroku (node v6.10.2) #298

OussamaRomdhane opened this issue Apr 5, 2017 · 8 comments

Comments

@OussamaRomdhane
Copy link

npm ERR! node v6.10.2
       npm ERR! npm  v3.10.10
       npm ERR! code ELIFECYCLE
       
       npm ERR! [email protected] install: `node-gyp rebuild`
       npm ERR! Exit status 1
       npm ERR!
       npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
       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 lwip 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 information on how to open an issue for this project with:
       npm ERR!     npm bugs lwip
       npm ERR! Or if that isn't available, you can get their info via:
       npm ERR!     npm owner ls lwip
       npm ERR! There is likely additional logging output above.
       
       npm ERR! Please include the following file with any support request:
       npm ERR!     /tmp/build_99265a0bab5ed98b6bb931306e82910b/MangooID-Back-End-753f7829e6307dcbe4d84626349eeba8d3af1861/npm-debug.log
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
@alperozisik
Copy link

I have problem with node 6.10.2 too.
I have tested also with 4.7.3; does not build
4.4.7 works.

It is not related with Heroku.
I was running the script in a container

@OussamaRomdhane
Copy link
Author

OussamaRomdhane commented Apr 6, 2017

@alperozisik In case this helps you I had to downgrade to node 6.9.2 and npm 3.10.9 (matched my production to my development environment which I should have done since the beginning)

In Heroku the node js version the server uses is the same found in the package.js file under the engines property so I just changed that from

"engines": {
    "node": "6.x"
  }

to

"engines": {
    "node": "6.9.2",
    "npm": "3.10.9"
  }

That fixed it for me because lwip always worked in my dev environment and used to work but stopped working in our prod environment.

Now, you may not be able to do that; I was able to because I'm the sole back end developer in the team and I knew any node 6 version will do. However if you can change the node and npm version as you like then I recommend to change to those settings.

@katelovescode
Copy link

Chiming in, also problems with 6.10.2 on my local.

@SimonSchick
Copy link

Same problem here, builds with 6.9

@jpepper07
Copy link

Thanks for pointing me int he right direction @OussamaRomdhane . It seems heroku updated their engines.

@zxfrank
Copy link

zxfrank commented Apr 26, 2017

Same problem here (not with heroku)

_CC(target) Release/obj.target/lwip_decoder/src/lib/png/png.o
In file included from ../src/lib/png/png.c:14:0:
../src/lib/png/pngpriv.h:805:4: error: #error ZLIB_VERNUM != PNG_ZLIB_VERNUM "-I (include path) error: see the notes in pngpriv.h"
error ZLIB_VERNUM != PNG_ZLIB_VERNUM
^
lwip_decoder.target.mk:165: recipe for target 'Release/obj.target/lwip_decoder/src/lib/png/png.o' failed
make: *** [Release/obj.target/lwip_decoder/src/lib/png/png.o] Error 1
make: Leaving directory '[MY FOLDER]/node_modules/lwip/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:285:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-72-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd [MY FOLDER]/node_modules/lwip
gyp ERR! node -v v6.10.2
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok

ubuntu 16.04.2
GNU Make 4.1
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

@zxfrank
Copy link

zxfrank commented Apr 26, 2017

see #297

@arackaf
Copy link

arackaf commented May 13, 2017

For the benefit of anyone else in search of a solution, your best bet may be to give jimp a try. It has a similar (and sometimes simpler) API, with zero external dependencies, so no more struggling with node-gyp.

https://www.npmjs.com/package/jimp

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

7 participants