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

Fix install.js error message #92

Open
NikitaEgorov opened this issue Oct 20, 2017 · 2 comments
Open

Fix install.js error message #92

NikitaEgorov opened this issue Oct 20, 2017 · 2 comments

Comments

@NikitaEgorov
Copy link

Please change

if (err) {
	log.error(err.stack);
	return;
}

to

if (err) {
	log.error(err);
	return;
}
@sindresorhus
Copy link
Contributor

Why? .stack includes the error message too:

(new Error('foo')).stack
"Error: foo
    at <anonymous>:1:2"

@NikitaEgorov
Copy link
Author

In build process it is look like:

/build/node_modules/optipng-bin # node lib/install.js
  ⚠ spawn /build/node_modules/optipng-bin/vendor/optipng ENOENT
  ⚠ optipng pre-build test failed
  ℹ compiling from source
  ✖ Error: ./configure --with-system-zlib --prefix="/build/node_modules/optipng-bin/vendor" --bindir="/build/node_modules/optipng-bin/vendor" && make install
Command failed: ./configure --with-system-zlib --prefix="/build/node_modules/optipng-bin/vendor" --bindir="/build/node_modules/optipng-bin/vendor"

    at ChildProcess.exithandler (child_process.js:206:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

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

2 participants