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 #4

Open
smartwsw opened this issue Apr 7, 2016 · 19 comments
Open

Failed to build #4

smartwsw opened this issue Apr 7, 2016 · 19 comments

Comments

@smartwsw
Copy link

smartwsw commented Apr 7, 2016

This fails on my system gulp --production.
Nodejs version v5.10.1
GraphicsMagick v1.3.23
err information:

events.js:154
      throw er; // Unhandled 'error' event
      ^
Error: Stream yields empty buffer
    at Socket.<anonymous> (/var/www/html/not-gwent-online/node_modules/gm/lib/command.js:57:17)
    at emitNone (events.js:85:20)
    at Socket.emit (events.js:179:7)
    at endReadableNT (_stream_readable.js:913:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
npm ERR! Linux 3.16.0-4-686-pae
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `gulp --production`
npm ERR! Exit status 1

@KaiserKatze
Copy link

/var/www/html/not-gwent-online/node_modules/gm/lib/command.js:57:17 ;)

@exane
Copy link
Owner

exane commented Apr 8, 2016

I tried to reproduce the error you get on both windows and osx with gm v1.3.23 and node v5.10.1 installed, but couldn't find anything.

You can give it a shot and try to edit the package.json file and replace the version of "gm" libraries with an asterisk and rerun the build command.

e.g replace "gulp-gm": "0.0.7",
to "gulp-gm": "*",

Then run

npm install
npm run build

again and maybe it fixes your issue.

Other than that it might be an issue with the gm library itself.

@smartwsw
Copy link
Author

Not works for me, I got the same error information after replacing all the places with "gulp"

@smartwsw
Copy link
Author

npm-debug.log.txt
here's the log

@KaiserKatze
Copy link

your link cannot be found anymore 😆

@WheteThunger
Copy link

I am also having issues with the gulp-gm dependency when running npm run build. I tried the suggested fix (now uses 0.0.8) and get this:

events.js:141
      throw er; // Unhandled 'error' event
      ^
Error: write EPIPE
    at exports._errnoException (util.js:874:11)
    at Socket._writeGeneric (net.js:675:26)
    at Socket._write (net.js:694:8)
    at doWrite (_stream_writable.js:292:12)
    at writeOrBuffer (_stream_writable.js:278:5)
    at Socket.Writable.write (_stream_writable.js:207:11)
    at Socket.write (net.js:618:40)
    at gm._spawn (D:\not-gwent-online-master\node_modules\gulp-gm\node_modules\gm\lib\command.js:249:18)
    at D:\not-gwent-online-master\node_modules\gulp-gm\node_modules\gm\lib\command.js:140:19
    at series (D:\not-gwent-online-master\node_modules\gulp-gm\node_modules\gm\node_modules\array-series\index.js:11:36)
    at gm._preprocess (D:\not-gwent-online-master\node_modules\gulp-gm\node_modules\gm\lib\command.js:177:5)
    at gm.stream (D:\not-gwent-online-master\node_modules\gulp-gm\node_modules\gm\lib\command.js:138:10)
    at gm.toBuffer (D:\not-gwent-online-master\node_modules\gulp-gm\node_modules\gm\lib\command.js:162:17)
    at finish (D:\not-gwent-online-master\node_modules\gulp-gm\index.js:44:24)
    at Transform._transform (D:\not-gwent-online-master\node_modules\gulp-gm\index.js:61:7)
    at Transform._read (D:\not-gwent-online-master\node_modules\gulp-gm\node_modules\through2\node_modules\readable-stream\lib\_stream_transform.js:184:10)

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `gulp --production`
npm ERR! Exit status 1

npm-debug.log

@oddsam91
Copy link

I'm getting the same error as smartwsw. Updating all references of "gulp*" in package.json and re running npm install and npm run build changed nothing.

These are my exact steps from a fresh install of Ubuntu 15.10 on a cloud server.

# Install node 5.x
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential

#Complie graphicsmagick
wget https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.23/GraphicsMagick-1.3.23.tar.gz/download
mv download GraphicsMagick-1.3.23.tar.gz
tar -xzvf GraphicsMagick-1.3.23.tar.gz 
cd GraphicsMagick-1.3.23/
./configure CC=c99 CFLAGS=-O2 LIBS=-lposix
make
make install
gm -version

# Clone from git and setup apache2
sudo apt-get install git apache2
cd /var/www/html/
git clone https://github.com/exane/not-gwent-online
cd not-gwent-online/

# Run install instructions
npm install
npm run build # Failed and suggested npm rebuild node-sass
npm rebuild node-sass
npm run build # Failed like smartwsw's error

@dobroliubov
Copy link

If you trying to install it on Ubuntu, then check the following SOF question:
http://stackoverflow.com/questions/21168141/cannot-install-packages-using-node-package-manager-in-ubuntu
The top-rated answer says:

First of all let me clarify the situation a bit. In summer 2012 Debian maintainers decided to rename Node.js executable to prevent some kind of namespace collision with another package. It was very hard decision for Debian Technical Committee, because it breaks backward compatibility.

The following is a quote from Committee resolution draft, published in Debian mailing list:

The nodejs package shall be changed to provide /usr/bin/nodejs, not /usr/bin/node. The package should declare a Breaks: relationship with any packages in Debian that reference /usr/bin/node.
The nodejs source package shall also provide a nodejs-legacy binary package at Priority: extra that contains /usr/bin/node as a symlink to /usr/bin/nodejs. No package in the archive may depend on or recommend the nodejs-legacy package, which is provided solely for upstream
compatibility. This package declares shall also declare a Conflicts: relationship with the node package.
<...>
Paragraph 2 is the actual solution for OP's issue. OP should try to install this package instead of doing symlink by hand. Here is a link to this package in Debian package index website.

It can be installed using sudo apt-get install nodejs-legacy.

I have not found any information about adopting the whole thing by NPM developers, but I think npm package will be fixed on some point and nodejs-legacy become really legacy.

@exane
Copy link
Owner

exane commented Apr 21, 2016

Can you try to install graphicsmagick v1.3.18 on ubuntu? I don't have access to my ubuntu server right now, but I know that I have v1.3.18 installed and I was able to run the whole install process last week without getting an error.

@JerryBels
Copy link

+1 same error on CentOS 7

> gulp --production

[12:44:10] Using gulpfile /var/www/html/gwent/gulpfile.js
[12:44:10] Starting 'watch'...
[12:44:10] Finished 'watch' after 80 μs
[12:44:10] Starting 'browserify'...
[12:44:10] Finished 'browserify' after 23 ms
[12:44:10] Starting 'sass'...
[12:44:10] Finished 'sass' after 9.58 ms
[12:44:10] Starting 'unit tests'...
[12:44:10] Finished 'unit tests' after 11 ms
[12:44:10] Starting 'index'...
[12:44:10] Finished 'index' after 4.21 ms
[12:44:10] Starting 'resize sm'...
[12:44:10] Starting 'resize md'...

events.js:141
      throw er; // Unhandled 'error' event
      ^
Error: Stream yields empty buffer
    at Socket.<anonymous> (/var/www/html/gwent/node_modules/gulp-gm/node_modules/gm/lib/command.js:57:17)
    at emitNone (events.js:72:20)
    at Socket.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:913:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)

npm ERR! Linux 3.10.0-229.7.2.el7.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v4.4.4
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `gulp --production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'gulp --production'.
npm ERR! This is most likely a problem with the Gwent-online package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp --production
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs Gwent-online
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls Gwent-online
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /var/www/html/gwent/npm-debug.log

Here is the log

npm-debug.txt

@underwoo16
Copy link

Having the exact same issue on OSX 10.11.5. Will update if I figure anything out and would appreciate an update if anyone has made progress on this. Thanks!

@underwoo16
Copy link

Okay I figured out the fix. (at least for me).

It was that GraphicksMagick was lacking the dependencies for png and jpeg support. I went here: libpng to grab the png dependency and here jpegsrc for the jpeg dependency and installed both of these. The png one might actually be the only required one.

After installing those I completely reconfigured and rebuilt GraphicksMagick. I ran "make distclean" followed by "./configure" and then "make" and "make install". At this point I was able to build gwent completely.

Hopefully this works for you!

@neolithik
Copy link

Hi i have problem when i trying do npm run build
i got error

[email protected] build /var/www/not-gwent-online
gulp --production

[10:26:56] Using gulpfile /var/www/not-gwent-online/gulpfile.js
[10:26:56] Starting 'watch'...
[10:26:56] Finished 'watch' after 48 μs
[10:26:56] Starting 'browserify'...
[10:26:56] Finished 'browserify' after 15 ms
[10:26:56] Starting 'sass'...
[10:26:56] Finished 'sass' after 5.68 ms
[10:26:56] Starting 'unit tests'...
[10:26:56] Finished 'unit tests' after 8.11 ms
[10:26:56] Starting 'index'...
[10:26:56] Finished 'index' after 1.94 ms
[10:26:56] Starting 'resize sm'...
[10:26:56] Starting 'resize md'...

events.js:72
throw er; // Unhandled 'error' event
^
Error: Stream yields empty buffer
at Socket. (/var/www/not-gwent-online/node_modules/gulp-gm/node_modules/gm/lib/command.js:57:17)
at Socket.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:448:13)
npm ERR! weird error 8
npm ERR! not ok code 0

some on can help me ?

@Millionaryearl
Copy link

exactly same issue found here on OS X

@Millionaryearl
Copy link

neither update package.json, nor reinstall GraphicksMagick with libjpeg & libpng work. Any one have any progress?

@arojasq
Copy link

arojasq commented Aug 19, 2016

I had this issue too on OSX El Capitan (10.11.6), and underwoo16 answer actually worked. Now the problem I have is that I don't see the card images, but I'll post about that in a different thread 😄

@jarismar
Copy link

I had the same 'Stream yelds empty buffer' issue. After reading the answer from underwoo16. I installed libpng and graphicsmagick, I'm on mac osx sierra (10.12.3). This solved the issue.

brew install libpng
brew install graphicsmagick

After this I could build without errors. Hope this helps. Tks.

@jayasme
Copy link

jayasme commented Nov 14, 2018

graphicsmagick

Worked for me.
But in higher version of OSX such as High Serria or Mojave, brew install seems to encounter permission issues, so need to update Homebrew, run brew update first of all.

@VincentChalnot
Copy link

After many attempts, I finally made it:

In package.json:

"gulp-gm": "*"
"gulp-sass": "^3.0.0",
npm update -g npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt install graphicsmagick zlib1g-dev optipng libpng3 libpng16-16
rm -rf node_modules
npm cache clear
npm install
npm run build

Half of these commands are probably useless but it might help you find what's wrong. In the end it compiled successfully! 👍

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