Giter VIP home page Giter VIP logo

node-jpeg-turbo's Introduction

node-jpeg-turbo

Build Status npm npm npm

node-jpeg-turbo provides minimal libjpeg-turbo bindings for Node.js. It is very, very fast compared to other alternatives, such as node-imagemagick-native or jpeg-js.

Please ask if you need more methods exposed.

Requirements

Only the most recent version of Node still in active Long-term Support (currently v4) and greater are supported. Older versions may or may not work; they are not and will not be supported.

We provide prebuilt bindings for some platforms using prebuilt-bindings, meaning that you should not have to compile native bindings from source very often. The bindings are hosted at and automatically installed from our GitHub Releases.

If you must build from source

First, if you're building from the repo, make sure to init and update submodules or you'll get confusing errors about missing targets when building. We include libjpeg-turbo as a submodule.

git submodule init
git submodule update

(or just use git clone --recursive when cloning the repo)

Due to massive linking pain on Ubuntu, we embed and build libjpeg-turbo directly with node-gyp. Unfortunately this adds an extra requirement, as the build process needs yasm to enable all optimizations. Note that this step is only required for x86 and x86_64 architectures. You don't need yasm if you're building on arm, for example.

Here's how to install yasm:

On OS X

brew install yasm

On Ubuntu 14.04

apt-get install yasm

On Ubuntu 12.04

apt-get install yasm

Important! Ubuntu 12.04 comes with GCC 4.6, which is too old to compile the add-on (and most other modules since Node.js 4.0 was released). More information is available here.

If you really must use this module on Ubuntu 12.04, the following may work:

apt-get install python-software-properties
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get -y install g++-4.8
export CXX=g++-4.8

Remember to export CXX when you npm install.

On Debian

apt-get install yasm

On Alpine Linux

apk add yasm

On Windows

Download Win32 or Win64 yasm from here and make sure it's found in path as yasm.exe. Use the "for general use" version. If the .exe doesn't run, or complains about a missing MSVCR100.dll, go to KB2977003 and find "Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update" under "Visual Studio 2010 (VC++ 10.0) SP1". The .exe should work fine after installing the redistributable.

To verify your yasm setup, run:

yasm

This should give the output:

yasm: No input files specified

Next, you need to make sure that you have a build environment set up. An easy way to do that is to use windows-build-tools.

Now, just to make sure things are set up properly, run:

npm config get msvs_version

If the output is 2015 or newer, you're good. If it's anything else, or not set, you must run:

npm config set -g msvs_version 2015

Alternatively, you can specify the option at install time with --msvs_version=2015.

Others

Search your package manager for yasm.

Installation

Make sure you've got the requirements installed first.

Using yarn:

yarn add jpeg-turbo

Using npm:

npm install --save jpeg-turbo

API

jpg.bufferSize(options)Number

If you'd like to preallocate a Buffer for jpg.compressSync(), use this method to get the worst-case upper bound. The options argument is fully compatible with the jpg.compressSync() method, so that you can pass the same options to both functions.

  • options is an Object with the following properties:
    • width Required. The width of the image.
    • height Required. The height of the image.
    • subsampling Optional. The subsampling method to use. Defaults to jpg.SAMP_420.
  • Returns The Number of bytes required in a worst-case scenario.
var fs = require('fs')
var jpg = require('jpeg-turbo')

var raw = fs.readFileSync('raw.rgba')

var options = {
  format: jpg.FORMAT_RGBA,
  width: 1080,
  height: 1920,
  subsampling: jpg.SAMP_444,
}

var preallocated = new Buffer(jpg.bufferSize(options))

var encoded = jpg.compressSync(raw, preallocated, options)

jpg.compressSync(raw[, out], options)Buffer

Compresses (i.e. encodes) the raw pixel data into a JPG. This method is not capable of resizing the image.

For efficiency reasons you may choose to encode into a preallocated Buffer. While fast, it has a number of drawbacks. Namely, you'll have to be careful not to reuse the buffer in async processing before processing (e.g. saving, displaying or transmitting) the entire encoded image. Otherwise you risk corrupting the image. Also, it wastes a huge amount of space compared to on-demand allocation.

  • raw is a Buffer with the raw pixel data in options.format.
  • out is an optional preallocated Buffer for the encoded image. The size of the buffer is checked. See jpg.bufferSize() for an example of how to preallocate a sufficient Buffer. If not given, memory is allocated and reallocated as needed, which eliminates most of the wasted space but is slower and lacks consistency with varying source images.
  • options is an Object with the following properties:
    • format Required. The format of the raw pixel data (e.g. jpg.FORMAT_RGBA).
    • width Required. The width of the image.
    • height Required. The height of the image.
    • subsampling Optional. The subsampling method to use. Defaults to jpg.SAMP_420.
    • quality Optional. The desired JPG quality. Defaults to 80.
  • Returns The encoded image as a Buffer. Note that the buffer may actually be a slice of the preallocated Buffer, if given. Be careful not to reuse the preallocated buffer before you've finished processing the encoded image, as it may corrupt the image.
var fs = require('fs')
var jpg = require('jpeg-turbo')

var raw = fs.readFileSync('raw.rgba')

var options = {
  format: jpg.FORMAT_RGBA,
  width: 1080,
  height: 1920,
  subsampling: jpg.SAMP_444,
}

var encoded = jpg.compressSync(raw, options)

See jpg.bufferSize() for an example of preallocated Buffer usage.

jpg.decompressSync(image[, out], options)Object

Decompresses (i.e. decodes) the JPG image into raw pixel data.

  • image is a Buffer with the JPG image data.
  • out is an optional preallocated Buffer for the decoded image. The size of the buffer is checked, and should be at least width * height * bytes_per_pixel or larger. If not given, one is created for you. The only benefit of providing the Buffer yourself is that you can reuse the same buffer between multiple jpg.decompressSync() calls. Note that this can lead to issues with concurrency. See jpg.compressSync() for related discussion.
  • options is an Object with the following properties:
    • format Required. The desired format of the raw pixel data (e.g. jpg.FORMAT_RGBA).
    • out Deprecated. Use the out argument instead.
  • Returns An Object with the following properties:
    • data A Buffer with the raw pixel data.
    • width The width of the image.
    • height The height of the image.
    • subsampling The subsampling method used in the JPG.
    • size Deprecated. Use data.length instead.
    • bpp The number of bytes per pixel.
var fs = require('fs')
var jpg = require('jpeg-turbo')

var image = fs.readFileSync('image.jpg')

var options = {
  format: jpg.FORMAT_RGBA,
}

var decoded = jpg.decompressSync(image, options)

Thanks

License

See LICENSE.

Copyright © Simo Kinnunen. All Rights Reserved.

node-jpeg-turbo's People

Contributors

empee avatar sorccu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-jpeg-turbo's Issues

Can't install this module with Node.js version 6.

---- Description ---------
This module can be install successfully with Node.js Version 4.8.4, but can not be installed under Node.js Version 6.

----- Node & NPM version ----
panda@xxx:/rs/node-realsense-1/samples/or_tutorial_2_web$ node --version
v6.11.3
panda@xxx:
/rs/node-realsense-1/samples/or_tutorial_2_web$ npm --version
3.10.10
panda@xxx:/rs/node-realsense-1/samples/or_tutorial_2_web$ uname -a
Linux xxx: 4.8.0-36-generic #36
16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

---------------- The error log ---------
panda@latte-panda:~$ npm install jpeg-turbo

[email protected] install /home/panda/node_modules/jpeg-turbo
node-pre-gyp install --fallback-to-build

make: Entering directory '/home/panda/node_modules/jpeg-turbo/build'
RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_0 Release/obj/gen/jfdctflt-sse-64.o
/bin/sh: 1: yasm: not found
deps/jpeg-turbo.target.mk:10: recipe for target 'Release/obj/gen/jfdctflt-sse-64.o' failed
make: *** [Release/obj/gen/jfdctflt-sse-64.o] Error 127
make: Leaving directory '/home/panda/node_modules/jpeg-turbo/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/panda/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276: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:219:12)
gyp ERR! System Linux 4.8.0-36-generic
gyp ERR! command "/home/panda/.nvm/versions/node/v6.11.3/bin/node" "/home/panda/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/panda/node_modules/jpeg-turbo/lib/binding/node-v48-linux-x64/jpegturbo.node" "--module_name=jpegturbo" "--module_path=/home/panda/node_modules/jpeg-turbo/lib/binding/node-v48-linux-x64"
gyp ERR! cwd /home/panda/node_modules/jpeg-turbo
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/home/panda/.nvm/versions/node/v6.11.3/bin/node /home/panda/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/panda/node_modules/jpeg-turbo/lib/binding/node-v48-linux-x64/jpegturbo.node --module_name=jpegturbo --module_path=/home/panda/node_modules/jpeg-turbo/lib/binding/node-v48-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/panda/node_modules/jpeg-turbo/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:920:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
node-pre-gyp ERR! System Linux 4.8.0-36-generic
node-pre-gyp ERR! command "/home/panda/.nvm/versions/node/v6.11.3/bin/node" "/home/panda/node_modules/jpeg-turbo/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/panda/node_modules/jpeg-turbo
node-pre-gyp ERR! node -v v6.11.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.19
node-pre-gyp ERR! not ok
Failed to execute '/home/panda/.nvm/versions/node/v6.11.3/bin/node /home/panda/.nvm/versions/node/v6.11.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/panda/node_modules/jpeg-turbo/lib/binding/node-v48-linux-x64/jpegturbo.node --module_name=jpegturbo --module_path=/home/panda/node_modules/jpeg-turbo/lib/binding/node-v48-linux-x64' (1)
npm WARN enoent ENOENT: no such file or directory, open '/home/panda/package.json'
npm WARN panda No description
npm WARN panda No repository field.
npm WARN panda No README data
npm WARN panda No license field.
npm ERR! Linux 4.8.0-36-generic
npm ERR! argv "/home/panda/.nvm/versions/node/v6.11.3/bin/node" "/home/panda/.nvm/versions/node/v6.11.3/bin/npm" "install" "jpeg-turbo"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
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 jpeg-turbo 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 information on how to open an issue for this project with:
npm ERR! npm bugs jpeg-turbo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls jpeg-turbo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/panda/npm-debug.log
panda@latte-panda:~$

Windows instructions for installations results in error & prebuilt releases throwing 404s

I've followed the steps in the windows installation and have yasm available and my msvs_version is 2015. Performing the installation on stf using npm install --save jpeg-turbo results in the following error messages.

While installing jpeg-turbo using npm in the stf repository.

> [email protected] install C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo
> node-pre-gyp install --fallback-to-build

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  Building "C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\build\Release\obj/global_intermediate/jfdctflt-sse-64.obj"
  yasm: FATAL: unable to open include file `jsimdcfg.inc'
C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\build\deps\jpeg-turbo.targets(28,5): error MSB3721: The command "call "yasm" "-felf" "-o" "C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_module
s\jpeg-turbo\build\Release\obj\global_intermediate\jfdctflt-sse-64.obj" "..\..\deps\libjpeg-turbo\simd\jfdctflt-sse-64.asm"" exited with code 1. [C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\build\deps\
jpeg-turbo.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\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:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\t-sus\\Documents\\OpenSource\\GameAutomators\\stf\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\Users\\t-sus\\Documents\\OpenSource\\GameAutomators\\stf\\node_modules\\jpeg-turbo\\lib\\binding\\node-v51-win32-x64\\jpegturbo.node" "--module_name=jpegturbo" "--module_path=C:\\Users\\t-sus\\Documents\\OpenSource\\GameAutomators\\stf\\node_modules\\jpeg-turbo\\lib\\binding\\node-v51-win32-x64"
gyp ERR! cwd C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\lib\binding\node-v51-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\lib\binding\node-v51-win32-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:899:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Windows_NT 10.0.14393
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\t-sus\\Documents\\OpenSource\\GameAutomators\\stf\\node_modules\\jpeg-turbo\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo
node-pre-gyp ERR! node -v v7.8.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.19
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\lib\binding\node-v51-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\lib\binding\node-v51-win32-x64' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN Error: EPERM: operation not permitted, lstat 'C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\node_modules\node-pre-gyp\node_modules\tar-pack\node_modules\rimraf\node_modules\glob\node_modules\minimatch\node_modules\brace-expansion\node_modules'
npm WARN  { Error: EPERM: operation not permitted, lstat 'C:\Users\t-sus\Documents\OpenSource\GameAutomators\stf\node_modules\jpeg-turbo\node_modules\node-pre-gyp\node_modules\tar-pack\node_modules\rimraf\node_modules\glob\node_modules\minimatch\node_modules\brace-expansion\node_modules'
npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'lstat',
npm WARN   path: 'C:\\Users\\t-sus\\Documents\\OpenSource\\GameAutomators\\stf\\node_modules\\jpeg-turbo\\node_modules\\node-pre-gyp\\node_modules\\tar-pack\\node_modules\\rimraf\\node_modules\\glob\\node_modules\\minimatch\\node_modules\\brace-expansion\\node_modules' }
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "jpeg-turbo"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
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 jpeg-turbo 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 information on how to open an issue for this project with:
npm ERR!     npm bugs jpeg-turbo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls jpeg-turbo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\t-sus\AppData\Roaming\npm-cache\_logs\2017-04-03T09_05_09_628Z-debug.log

Errors while building node-jpeg-turbo.

C:\Users\t-sus\Documents\OpenSource\GameAutomators\node-jpeg-turbo>npm install

> [email protected] install C:\Users\t-sus\Documents\OpenSource\GameAutomators\node-jpeg-turbo
> node ./prebuilt-bindings install

[prebuilt-bindings] => Testing 'C:\Users\t-sus\Documents\OpenSource\GameAutomators\node-jpeg-turbo\build\Release\jpegturbo.node'...
[prebuilt-bindings] => Binding not found or incompatible
[prebuilt-bindings] => Downloading 'https://github.com/sorccu/node-jpeg-turbo/releases/download/v0.4.0/jpegturbo-51-win32-x64.node.gz'...
[prebuilt-bindings] => Server responded with '404 Not Found'
[prebuilt-bindings] => Downloading 'https://github.com/sorccu/node-jpeg-turbo/releases/download/v0.4.0/jpegturbo-51-win32-x64.node'...
[prebuilt-bindings] => Server responded with '404 Not Found'
[prebuilt-bindings] => Unable to install prebuilt bindings: Error: No compatible bindings found
[prebuilt-bindings] => Building from source...

C:\Users\t-sus\Documents\OpenSource\GameAutomators\node-jpeg-turbo>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp ERR! clean error
gyp ERR! stack Error: EPERM: operation not permitted, unlink 'C:\Users\t-sus\Documents\OpenSource\GameAutomators\node-jpeg-turbo\build\Release\jpegturbo.node'
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\t-sus\Documents\OpenSource\GameAutomators\node-jpeg-turbo
gyp ERR! node -v v7.8.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok
Usage: prebuilt-bindings [command...]

Commands:
  build     Builds bindings locally.
  clean     Removes installed bindings.
  config    Prints out the resolved config. Can be useful to understand what
            prebuilt-bindings sees.
  install   Installs prebuilt bindings or builds them if none can be found.
            Default command if none is given.
  pack      Packs configured bindings into properly named individual archives
            for easy deployment.

Error: node-gyp failed with status 1

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.8.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./prebuilt-bindings install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node ./prebuilt-bindings install'.
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 jpeg-turbo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./prebuilt-bindings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs jpeg-turbo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls jpeg-turbo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\t-sus\AppData\Roaming\npm-cache\_logs\2017-04-03T09_06_32_317Z-debug.log

Can you please tell me where I am going wrong here in the setup on windows ? I've been trying this for a few days now. I could successfully run it on mac. Should the prebuilt URLs be fixed for installations to work properly ?

Installing bode-jpeg-turbo windows server 2012 r2

Hi sorccu

I'm building the stf project on windows server 2012, I think I'm on a good point on this.

Anyways, the only problem I'm still facing is with the node-jpeg-turbo module

I'm installing it via npm install -g stf --msvs_version=2013

Everything installs but this module, it throws me this error:

yasm: Error FATAL: Unable to open include file 'jsimdcfg.inc'

I'm using yasm version 1.3.0 for windows x64

It is already on C:\windows\yasm

Changed yasm name from yasm-1.3.0-x64 to simply yasm.exe, added to win PATH.

I can run it from cmd terminal, only when I'm installing node-jpeg-turbo module it throws that error

Any ideas?

Thank You in advance!

recompress jpeg

Hi,

thank you for your work!
is it possible to recompress an allready compressed jpeg base64 str?
I create a jpeg from a browser canvas element like canvas.toDataURL("image/jpeg", 1.0);
then i send it to the server and send it to all other clients. Now it could be that there is one client with low bandwidth, so i want to compress the image more down like to a 0.5.
is this possible with this library?
can you guide me in the right direction?

regards

Celevra

Installation breaks with Node 10.3.0

It used to work with Node 10.1.0, but then I upgraded it and got this error:

MacOS 10.13.4

> [email protected] install .../node_modules/jpeg-turbo
> node-pre-gyp install --fallback-to-build

node-pre-gyp info it worked if it ends with ok
node-pre-gyp verb cli [ '/Users/eliseumds/.nvm/versions/node/v10.3.0/bin/node',
node-pre-gyp verb cli   '.../node_modules/jpeg-turbo/node_modules/.bin/node-pre-gyp',
node-pre-gyp verb cli   'install',
node-pre-gyp verb cli   '--fallback-to-build' ]
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp verb command install []
node-pre-gyp info check checked for ".../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64/jpegturbo.node" (not found)
node-pre-gyp http GET https://pre-gyp.s3.amazonaws.com/jpegturbo/v0.4.0/jpegturbo-v0.4.0-node-v64-darwin-x64.tar.gz
node-pre-gyp http 403 https://pre-gyp.s3.amazonaws.com/jpegturbo/v0.4.0/jpegturbo-v0.4.0-node-v64-darwin-x64.tar.gz
node-pre-gyp http 403 status code downloading tarball https://pre-gyp.s3.amazonaws.com/jpegturbo/v0.4.0/jpegturbo-v0.4.0-node-v64-darwin-x64.tar.gz (falling back to source compile with node-gyp)
node-pre-gyp verb command build [ 'rebuild' ]
node-pre-gyp http Connection closed while downloading tarball file (falling back to source compile with node-gyp)
node-pre-gyp verb command build [ 'rebuild' ]
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_0 Release/obj/gen/jfdctflt-sse-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_0 Release/obj/gen/jfdctflt-sse-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_1 Release/obj/gen/jccolor-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_1 Release/obj/gen/jccolor-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_2 Release/obj/gen/jcgray-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_2 Release/obj/gen/jcgray-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_3 Release/obj/gen/jcsample-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_3 Release/obj/gen/jcsample-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_4 Release/obj/gen/jdcolor-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_4 Release/obj/gen/jdcolor-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_5 Release/obj/gen/jdmerge-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_5 Release/obj/gen/jdmerge-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_6 Release/obj/gen/jdsample-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_6 Release/obj/gen/jdsample-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_7 Release/obj/gen/jfdctfst-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_7 Release/obj/gen/jfdctfst-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_8 Release/obj/gen/jfdctint-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_8 Release/obj/gen/jfdctint-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_9 Release/obj/gen/jidctflt-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_9 Release/obj/gen/jidctflt-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_10 Release/obj/gen/jidctfst-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_10 Release/obj/gen/jidctfst-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_11 Release/obj/gen/jidctint-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_11 Release/obj/gen/jidctint-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_12 Release/obj/gen/jidctred-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_12 Release/obj/gen/jidctred-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_13 Release/obj/gen/jquantf-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_13 Release/obj/gen/jquantf-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_14 Release/obj/gen/jquanti-sse2-64.o
  RULE deps_libjpeg_turbo_gyp_jpeg_turbo_target_assemble_14 Release/obj/gen/jquanti-sse2-64.o
  CC(target) Release/obj.target/jpeg-turbo/deps/libjpeg-turbo/jcapimin.o
  CC(target) Release/obj.target/jpeg-turbo/deps/libjpeg-turbo/jcapimin.o
rm: ./Release/.deps/Release/obj.target/jpeg-turbo/deps/libjpeg-turbo/jcapimin.o.d.raw: No such file or directory
make: *** [Release/obj.target/jpeg-turbo/deps/libjpeg-turbo/jcapimin.o] Error 1
gyp   CC(target) Release/obj.target/jpeg-turbo/deps/libjpeg-turbo/jcapistd.o
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/eliseumds/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/Users/eliseumds/.nvm/versions/node/v10.3.0/bin/node" "/Users/eliseumds/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64/jpegturbo.node" "--module_name=jpegturbo" "--module_path=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64"
gyp ERR! cwd .../node_modules/jpeg-turbo
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/eliseumds/.nvm/versions/node/v10.3.0/bin/node /Users/eliseumds/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64/jpegturbo.node --module_name=jpegturbo --module_path=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (.../node_modules/jpeg-turbo/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/Users/eliseumds/.nvm/versions/node/v10.3.0/bin/node" ".../node_modules/jpeg-turbo/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd .../node_modules/jpeg-turbo
node-pre-gyp ERR! node -v v10.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.19
node-pre-gyp ERR! not ok
Failed to execute '/Users/eliseumds/.nvm/versions/node/v10.3.0/bin/node /Users/eliseumds/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64/jpegturbo.node --module_name=jpegturbo --module_path=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64' (1)
  CC(target) Release/obj.target/jpeg-turbo/deps/libjpeg-turbo/jccoefct.o Failed to exec install script
make: *** No rule to make target `../deps/libjpeg-turbo/jccolor.c', needed by `Release/obj.target/jpeg-turbo/deps/libjpeg-turbo/jccolor.o'.  Stop.
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/eliseumds/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/Users/eliseumds/.nvm/versions/node/v10.3.0/bin/node" "/Users/eliseumds/.nvm/versions/node/v10.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64/jpegturbo.node" "--module_name=jpegturbo" "--module_path=.../node_modules/jpeg-turbo/lib/binding/node-v64-darwin-x64"
gyp ERR! cwd .../node_modules/jpeg-turbo
gyp ERR! node -v v10.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of mocha@>=1.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/eliseumds/.npm/_logs/2018-06-06T02_38_24_259Z-debug.log

Build fail in node 6.2.2/6.3

When i try to install this package node throw error:

npm ERR! enoent ENOENT: no such file or directory, chmod '/vagrant/backend/s3dicom/node_modules/jpeg-turbo/node_modules/node-pre-gyp/node_modules/mkdirp/bin/cmd.js'

In builds fine on node v0.12, but i use v6.2.2 in my project.

Any ideas?

build failed

$ yarn add jpeg-turbo > 1.log
warning jpeg-turbo > node-pre-gyp > hawk > [email protected]: The major version is no longer supported. Please update to 4.x or newer
warning jpeg-turbo > node-pre-gyp > hawk > sntp > [email protected]: The major version is no longer supported. Please update to 4.x or newer
warning jpeg-turbo > node-pre-gyp > hawk > boom > [email protected]: The major version is no longer supported. Please update to 4.x or newer
error F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | win32 | x64
node-pre-gyp info check checked for "F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node" (not found)
node-pre-gyp http GET https://pre-gyp.s3.amazonaws.com/jpegturbo/v0.4.0/jpegturbo-v0.4.0-node-v57-win32-x64.tar.gz
node-pre-gyp http 403 https://pre-gyp.s3.amazonaws.com/jpegturbo/v0.4.0/jpegturbo-v0.4.0-node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Tried to download(403): https://pre-gyp.s3.amazonaws.com/jpegturbo/v0.4.0/jpegturbo-v0.4.0-node-v57-win32-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 403 status code downloading tarball https://pre-gyp.s3.amazonaws.com/jpegturbo/v0.4.0/jpegturbo-v0.4.0-node-v57-win32-x64.tar.gz

F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info ok

F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" configure --fallback-to-build --module=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64 ) else (node "" configure --fallback-to-build --module=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64 )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=2015',
gyp info spawn args '-I',
gyp info spawn args 'F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\build\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\Administrator\.node-gyp\8.9.4\include\node\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\Administrator\.node-gyp\8.9.4',
gyp info spawn args '-Dnode_gyp_dir=C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\Users\Administrator\.node-gyp\8.9.4\<(target_arch)\node.lib',
gyp info spawn args '-Dmodule_root_dir=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok

F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" build --fallback-to-build --module=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64 ) else (node "" build --fallback-to-build --module=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64 )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args '/clp:Verbosity=minimal',
gyp info spawn args '/nologo',
gyp info spawn args '/p:Configuration=Release;Platform=x64' ]
�ڴ˽��������һ������һ����Ŀ����Ҫ���ò������ɣ�����ӡ�/m�����ء�
Building "F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\build\Release\obj/global_intermediate/jfdctflt-sse-64.obj"
yasm: FATAL: unable to open include file jsimdcfg.inc' F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\build\deps\jpeg-turbo.targets(28,5): error MSB3721: ���call yasm "-felf" "-o" "F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\build\Release\obj\global_intermediate\jfdctflt-sse-64.obj" "..\..\deps\libjpeg-turbo\simd\jfdctflt-sse-64.asm"�����˳������ش���Ϊ 1�� [F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\build\deps\jpeg-turbo.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--module=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node" "--module_name=jpegturbo" "--module_path=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64"
gyp ERR! cwd F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'node-gyp.cmd build --fallback-to-build --module=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64' (1)
node-pre-gyp ERR! stack at ChildProcess. (F:\code\vnc\electron-webpack-quick-start\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "F:\code\vnc\electron-webpack-quick-start\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo
node-pre-gyp ERR! node -v v8.9.4
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64\jpegturbo.node --module_name=jpegturbo --module_path=F:\code\vnc\electron-webpack-quick-start\node_modules\jpeg-turbo\lib\binding\node-v57-win32-x64' (1)

Cannot find module

Trying to run on Ubuntu 14.04lts I get this error:
Cannot find module '~/node_modules/jpeg-turbo/lib/binding/node-v47-linux-x64/jpegturbo.node
I see that this exists:
jpeg-turbo/lib/binding/node-v46-linux-x64/jpegturbo.node

Any clues?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.