Gatsby: Error when running gatsby new gatsby-site; abrupt ending of installation

Created on 6 Oct 2018  Â·  7Comments  Â·  Source: gatsbyjs/gatsby

Description

I tried to run the command gatsby new gatsby-site.
But I am presented with this error:

[4/4] Building fresh packages...
error /media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments: 
Directory: /media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/sharp
Output:
info sharp Using cached /home/geeky_srm/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz
(node:23050) UnhandledPromiseRejectionWarning: ZlibError: zlib: unexpected end of file
    at Zlib.(anonymous function).onerror (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minizlib/index.js:131:21)
    at Unzip.write (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minizlib/index.js:255:31)
    at Unzip.flush (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minizlib/index.js:222:10)
    at Unzip.end (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minizlib/index.js:229:10)
    at Unpack.end (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/tar/lib/parse.js:415:21)
    at Yallist.pipes.forEach.p (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minipass/index.js:288:18)
    at Yallist.forEach (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minipass/node_modules/yallist/yallist.js:154:8)
    at ReadStream.emit (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minipass/index.js:285:18)
    at ReadStream.emit (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/fs-minipass/index.js:153:22)
    at ReadStream.[maybeEmitEnd] (/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/minipass/index.js:255:12)
(node:23050) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23050) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
prebuild-install WARN install libvips-cpp.so.42: cannot open shared object file: No such file or directory
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2.7
gyp info spawn args [ '/home/geeky_srm/.nvm/versions/node/v10.7.0/lib/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   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/sharp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/geeky_srm/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/geeky_srm/.node-gyp/10.7.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/geeky_srm/.node-gyp/10.7.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/geeky_srm/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/geeky_srm/.node-gyp/10.7.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/sharp',
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   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../vendor/include/glib-2.0/glib/galloca.h:32:0,
                 from ../vendor/include/glib-2.0/glib.h:30,
                 from ../vendor/include/glib-2.0/gobject/gbinding.h:28,
                 from ../vendor/include/glib-2.0/glib-object.h:23,
                 from ../vendor/include/vips/vips8:35,
                 from ../src/common.cc:25:
../vendor/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory
 #include <glibconfig.h>
          ^~~~~~~~~~~~~~
compilation terminated.
sharp.target.mk:126: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: Leaving directory '/media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/sharp/build'
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/geeky_srm/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262: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 Linux 4.15.0-36-generic
gyp ERR! command "/home/geeky_srm/.nvm/versions/node/v10.7.0/bin/node" "/home/geeky_srm/.nvm/versions/node/v10.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /media/geeky_srm/Docs And Stuff/WORK/00playground/gatsby-site/node_modules/sharp
gyp ERR! node -v v10.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Command failed: yarnpkg


  Error: Command failed: yarnpkg

  - index.js:236 Promise.all.then.arr
    [lib]/[gatsby-cli]/[execa]/index.js:236:11

  - util.js:16 tryCatcher
    [lib]/[gatsby-cli]/[bluebird]/js/release/util.js:16:23

  - promise.js:512 Promise._settlePromiseFromHandler
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:512:31

  - promise.js:569 Promise._settlePromise
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:569:18

  - promise.js:614 Promise._settlePromise0
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10

  - promise.js:694 Promise._settlePromises
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:694:18

  - promise.js:638 Promise._fulfill
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:638:18

  - promise_array.js:126 PromiseArray._resolve
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:126:19

  - promise_array.js:144 PromiseArray._promiseFulfilled
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise_array.js:144:14

  - promise.js:574 Promise._settlePromise
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:574:26

  - promise.js:614 Promise._settlePromise0
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:614:10

  - promise.js:694 Promise._settlePromises
    [lib]/[gatsby-cli]/[bluebird]/js/release/promise.js:694:18

  - async.js:138 _drainQueueStep
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:138:12

  - async.js:131 _drainQueue
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:131:9

  - async.js:147 Async._drainQueues
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:147:5

  - async.js:17 Immediate.Async.drainQueues [as _onImmediate]
    [lib]/[gatsby-cli]/[bluebird]/js/release/async.js:17:14

Steps to reproduce

Running gatsby new gatsby-site

Expected result

The new gatsby site would have been created

Actual result

Abrupt error.

Environment

System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 10.7.0 - ~/.nvm/versions/node/v10.7.0/bin/node
Yarn: 1.10.1 - /usr/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.7.0/bin/npm
Browsers:
Chrome: (47ead77cb35ad2a9a83248b292151462a66cd881)
Firefox: 62.0.3
npmGlobalPackages:
gatsby-cli: 2.4.2
gatsby: 2.0.12

Most helpful comment

info sharp Using cached /home/geeky_srm/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz
(node:23050) UnhandledPromiseRejectionWarning: ZlibError: zlib: unexpected end of file

Looks like the cached zip is broken. Does it work after

rm  /home/geeky_srm/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz

All 7 comments

info sharp Using cached /home/geeky_srm/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz
(node:23050) UnhandledPromiseRejectionWarning: ZlibError: zlib: unexpected end of file

Looks like the cached zip is broken. Does it work after

rm  /home/geeky_srm/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz

That did the trick!
Thanks a ton @stefanprobst . Was struggling with this since 2 days.
:100:

I have the same error (for the same Ubuntu Bionic), and doing @stefanprobst's rm /home/<user_name>/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz before gatsby new blog does not help.

I have the same error (for the same Ubuntu Bionic), and doing @stefanprobst's rm /home/<user_name>/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz before gatsby new blog does not help.

It worked after I npm uninstall -g gatsby-cli, rm again and npm install --global gatsby-cli!

I'm still experiencing this issue on my Mac

Gatsby CLI version: 2.8.5
Gatsby version: 2.16.1

I experience it when i follow your video tutorial (https://www.gatsbyjs.org/docs/quick-start) suggesting
npx gatsby new gatsby-site

but not when I execute
gatsby new gatsby-starter-site

Does your video need to be updated?

I'm still experiencing this issue on my Mac

Gatsby CLI version: 2.8.5
Gatsby version: 2.16.1

I experience it when i follow your video tutorial (https://www.gatsbyjs.org/docs/quick-start) suggesting
npx gatsby new gatsby-site

but not when I execute
gatsby new gatsby-starter-site

Does your video need to be updated?

Also experiencing it now, i have been sturggling on this for days. Here is what i got when excute yarn or npm install

error /mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp
Output:
info sharp Using cached /root/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.13.0 runtime=node arch=x64 platform=linux)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 2.7.15 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/data/node-v12.13.0-linux-x64/lib/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 'make',
gyp info spawn args '-I',
gyp info spawn args '/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/12.13.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/12.13.0',
gyp info spawn args '-Dnode_gyp_dir=/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/12.13.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp',
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 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../src/common.cc:27:0:
../src/common.h:82:20: error: ‘Handle’ is not a member of ‘v8’
bool HasAttr(v8::Handle obj, std::string attr);
^~
../src/common.h:82:37: error: expected primary-expression before ‘>’ token
bool HasAttr(v8::Handle obj, std::string attr);
^
../src/common.h:82:39: error: ‘obj’ was not declared in this scope
bool HasAttr(v8::Handle obj, std::string attr);
^~~
../src/common.h:82:56: error: expected primary-expression before ‘attr’
bool HasAttr(v8::Handle obj, std::string attr);
^~
../src/common.h:82:60: error: expression list treated as compound expression in initializer [-fpermissive]
bool HasAttr(v8::Handle obj, std::string attr);
^
../src/common.h:83:29: error: ‘Handle’ is not a member of ‘v8’
std::string AttrAsStr(v8::Handle obj, std::string attr);
^
~
../src/common.h:83:46: error: expected primary-expression before ‘>’ token
std::string AttrAsStr(v8::Handle obj, std::string attr);
^
../src/common.h:83:48: error: ‘obj’ was not declared in this scope
std::string AttrAsStr(v8::Handle obj, std::string attr);
^

../src/common.h:83:65: error: expected primary-expression before ‘attr’
std::string AttrAsStr(v8::Handle obj, std::string attr);
^~
../src/common.h:84:48: error: ‘Handle’ is not a member of ‘v8’
template v8::Local AttrAs(v8::Handle obj, std::string attr) {
^
~
../src/common.h:84:65: error: expected primary-expression before ‘>’ token
template v8::Local AttrAs(v8::Handle obj, std::string attr) {
^
../src/common.h:84:67: error: ‘obj’ was not declared in this scope
template v8::Local AttrAs(v8::Handle obj, std::string attr) {
^

../src/common.h:84:84: error: expected primary-expression before ‘attr’
template v8::Local AttrAs(v8::Handle obj, std::string attr) {
^~
../src/common.h:84:37: warning: variable templates only available with -std=c++14 or -std=gnu++14
template v8::Local AttrAs(v8::Handle obj, std::string attr) {
^
~
../src/common.h:84:90: error: expected ‘;’ before ‘{’ token
template v8::Local AttrAs(v8::Handle obj, std::string attr) {
^
../src/common.h:87:37: error: ‘Handle’ is not a member of ‘v8’
template T AttrTo(v8::Handle obj, std::string attr) {
^
~
../src/common.h:87:54: error: expected primary-expression before ‘>’ token
template T AttrTo(v8::Handle obj, std::string attr) {
^
../src/common.h:87:56: error: ‘obj’ was not declared in this scope
template T AttrTo(v8::Handle obj, std::string attr) {
^

../src/common.h:87:73: error: expected primary-expression before ‘attr’
template T AttrTo(v8::Handle obj, std::string attr) {
^~
../src/common.h:87:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
template T AttrTo(v8::Handle obj, std::string attr) {
^
~
../src/common.h:87:79: error: expected ‘;’ before ‘{’ token
template T AttrTo(v8::Handle obj, std::string attr) {
^
../src/common.h:90:37: error: ‘Handle’ is not a member of ‘v8’
template T AttrTo(v8::Handle obj, int attr) {
^
~
../src/common.h:90:54: error: expected primary-expression before ‘>’ token
template T AttrTo(v8::Handle obj, int attr) {
^
../src/common.h:90:56: error: ‘obj’ was not declared in this scope
template T AttrTo(v8::Handle obj, int attr) {
^

../src/common.h:90:61: error: expected primary-expression before ‘int’
template T AttrTo(v8::Handle obj, int attr) {
^~~
../src/common.h:87:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
template T AttrTo(v8::Handle obj, std::string attr) {
^~
../src/common.h:90:71: error: expected ‘;’ before ‘{’ token
template T AttrTo(v8::Handle obj, int attr) {
^
../src/common.h:96:9: error: ‘Handle’ is not a member of ‘v8’
v8::Handle input, std::vector> &buffersToPersist);
^~
../src/common.h:96:26: error: expected primary-expression before ‘>’ token
v8::Handle input, std::vector> &buffersToPersist);
^
../src/common.h:96:28: error: ‘input’ was not declared in this scope
v8::Handle input, std::vector> &buffersToPersist);
^~~
../src/common.h:96:28: note: suggested alternative: ‘ino_t’
v8::Handle input, std::vector> &buffersToPersist);
^
~~
ino_t
../src/common.h:96:70: error: expected primary-expression before ‘&’ token
v8::Handle input, std::vector> &buffersToPersist);
^
../src/common.h:96:71: error: ‘buffersToPersist’ was not declared in this scope
v8::Handle input, std::vector> &buffersToPersist);
^~~~
../src/common.h:96:87: error: expression list treated as compound expression in initializer [-fpermissive]
v8::Handle input, std::vector> &buffersToPersist);
^
../src/common.cc:34:20: error: redefinition of ‘bool sharp::HasAttr’
bool HasAttr(v8::Handle obj, std::string attr) {
^~
In file included from ../src/common.cc:27:0:
../src/common.h:82:8: note: ‘bool sharp::HasAttr’ previously defined here
bool HasAttr(v8::Handle obj, std::string attr);
^~~
../src/common.cc:34:20: error: ‘Handle’ is not a member of ‘v8’
bool HasAttr(v8::Handle obj, std::string attr) {
^~
../src/common.cc:34:37: error: expected primary-expression before ‘>’ token
bool HasAttr(v8::Handle obj, std::string attr) {
^
../src/common.cc:34:39: error: ‘obj’ was not declared in this scope
bool HasAttr(v8::Handle obj, std::string attr) {
^~~
../src/common.cc:34:56: error: expected primary-expression before ‘attr’
bool HasAttr(v8::Handle obj, std::string attr) {
^~
../src/common.cc:37:29: error: redefinition of ‘std::string sharp::AttrAsStr’
std::string AttrAsStr(v8::Handle obj, std::string attr) {
^
~
In file included from ../src/common.cc:27:0:
../src/common.h:83:15: note: ‘std::string sharp::AttrAsStr’ previously declared here
std::string AttrAsStr(v8::Handle obj, std::string attr);
^
~~
../src/common.cc:37:29: error: ‘Handle’ is not a member of ‘v8’
std::string AttrAsStr(v8::Handle obj, std::string attr) {
^~
../src/common.cc:37:46: error: expected primary-expression before ‘>’ token
std::string AttrAsStr(v8::Handle obj, std::string attr) {
^
../src/common.cc:37:48: error: ‘obj’ was not declared in this scope
std::string AttrAsStr(v8::Handle obj, std::string attr) {
^~~
../src/common.cc:37:65: error: expected primary-expression before ‘attr’
std::string AttrAsStr(v8::Handle obj, std::string attr) {
^~
../src/common.cc:43:9: error: redefinition of ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’
v8::Handle input, std::vector> &buffersToPersist
^
~
In file included from ../src/common.cc:27:0:
../src/common.h:95:20: note: ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’ previously defined here
InputDescriptor* CreateInputDescriptor(
^
~~~~
../src/common.cc:43:9: error: ‘Handle’ is not a member of ‘v8’
v8::Handle input, std::vector> &buffersToPersist
^
~
../src/common.cc:43:26: error: expected primary-expression before ‘>’ token
v8::Handle input, std::vector> &buffersToPersist
^
../src/common.cc:43:28: error: ‘input’ was not declared in this scope
v8::Handle input, std::vector> &buffersToPersist
^
~~
../src/common.cc:43:28: note: suggested alternative: ‘ino_t’
v8::Handle input, std::vector> &buffersToPersist
^~~
ino_t
../src/common.cc:43:70: error: expected primary-expression before ‘&’ token
v8::Handle input, std::vector> &buffersToPersist
^
../src/common.cc:43:71: error: ‘buffersToPersist’ was not declared in this scope
v8::Handle input, std::vector> &buffersToPersist
^
~~~~~
sharp.target.mk:134: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: Leaving directory '/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp/build'
make: * [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/data/node-v12.13.0-linux-x64/bin/node" "/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp

I'm still experiencing this issue on my Mac
Gatsby CLI version: 2.8.5
Gatsby version: 2.16.1
I experience it when i follow your video tutorial (https://www.gatsbyjs.org/docs/quick-start) suggesting
npx gatsby new gatsby-site
but not when I execute
gatsby new gatsby-starter-site
Does your video need to be updated?

Also experiencing it now, i have been sturggling on this for days. Here is what i got when excute yarn or npm install

error /mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
Arguments:
Directory: /mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp
Output:
info sharp Using cached /root/.npm/_libvips/libvips-8.6.1-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.13.0 runtime=node arch=x64 platform=linux)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 2.7.15 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args '/data/node-v12.13.0-linux-x64/lib/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 'make',
gyp info spawn args '-I',
gyp info spawn args '/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/12.13.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/12.13.0',
gyp info spawn args '-Dnode_gyp_dir=/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/12.13.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp',
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 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
In file included from ../src/common.cc:27:0:
../src/common.h:82:20: error: ‘Handle’ is not a member of ‘v8’
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~
../src/common.h:82:37: error: expected primary-expression before ‘>’ token
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^
../src/common.h:82:39: error: ‘obj’ was not declared in this scope
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~~
../src/common.h:82:56: error: expected primary-expression before ‘attr’
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~
../src/common.h:82:60: error: expression list treated as compound expression in initializer [-fpermissive]
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^
../src/common.h:83:29: error: ‘Handle’ is not a member of ‘v8’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^
~
../src/common.h:83:46: error: expected primary-expression before ‘>’ token
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^
../src/common.h:83:48: error: ‘obj’ was not declared in this scope
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^

../src/common.h:83:65: error: expected primary-expression before ‘attr’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^~
../src/common.h:84:48: error: ‘Handle’ is not a member of ‘v8’
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^
~
../src/common.h:84:65: error: expected primary-expression before ‘>’ token
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:84:67: error: ‘obj’ was not declared in this scope
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^

../src/common.h:84:84: error: expected primary-expression before ‘attr’
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^~
../src/common.h:84:37: warning: variable templates only available with -std=c++14 or -std=gnu++14
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^
~
../src/common.h:84:90: error: expected ‘;’ before ‘{’ token
template v8::Local AttrAs(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:87:37: error: ‘Handle’ is not a member of ‘v8’
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^
~
../src/common.h:87:54: error: expected primary-expression before ‘>’ token
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:87:56: error: ‘obj’ was not declared in this scope
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^

../src/common.h:87:73: error: expected primary-expression before ‘attr’
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^~
../src/common.h:87:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^
~
../src/common.h:87:79: error: expected ‘;’ before ‘{’ token
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.h:90:37: error: ‘Handle’ is not a member of ‘v8’
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^
~
../src/common.h:90:54: error: expected primary-expression before ‘>’ token
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^
../src/common.h:90:56: error: ‘obj’ was not declared in this scope
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^

../src/common.h:90:61: error: expected primary-expression before ‘int’
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^~~
../src/common.h:87:26: warning: variable templates only available with -std=c++14 or -std=gnu++14
template T AttrTo(v8::Handlev8::Object obj, std::string attr) {
^~
../src/common.h:90:71: error: expected ‘;’ before ‘{’ token
template T AttrTo(v8::Handlev8::Object obj, int attr) {
^
../src/common.h:96:9: error: ‘Handle’ is not a member of ‘v8’
v8::Handlev8::Object input, std::vector &buffersToPersist);
^~
../src/common.h:96:26: error: expected primary-expression before ‘>’ token
v8::Handlev8::Object input, std::vector &buffersToPersist);
^
../src/common.h:96:28: error: ‘input’ was not declared in this scope
v8::Handlev8::Object input, std::vector &buffersToPersist);
^~~
../src/common.h:96:28: note: suggested alternative: ‘ino_t’
v8::Handlev8::Object input, std::vector &buffersToPersist);
^
~~
ino_t
../src/common.h:96:70: error: expected primary-expression before ‘&’ token
v8::Handlev8::Object input, std::vector &buffersToPersist);
^
../src/common.h:96:71: error: ‘buffersToPersist’ was not declared in this scope
v8::Handlev8::Object input, std::vector &buffersToPersist);
^~~~
../src/common.h:96:87: error: expression list treated as compound expression in initializer [-fpermissive]
v8::Handlev8::Object input, std::vector &buffersToPersist);
^
../src/common.cc:34:20: error: redefinition of ‘bool sharp::HasAttr’
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~
In file included from ../src/common.cc:27:0:
../src/common.h:82:8: note: ‘bool sharp::HasAttr’ previously defined here
bool HasAttr(v8::Handlev8::Object obj, std::string attr);
^~~
../src/common.cc:34:20: error: ‘Handle’ is not a member of ‘v8’
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~
../src/common.cc:34:37: error: expected primary-expression before ‘>’ token
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.cc:34:39: error: ‘obj’ was not declared in this scope
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~~
../src/common.cc:34:56: error: expected primary-expression before ‘attr’
bool HasAttr(v8::Handlev8::Object obj, std::string attr) {
^~
../src/common.cc:37:29: error: redefinition of ‘std::string sharp::AttrAsStr’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^
~
In file included from ../src/common.cc:27:0:
../src/common.h:83:15: note: ‘std::string sharp::AttrAsStr’ previously declared here
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr);
^
~~
../src/common.cc:37:29: error: ‘Handle’ is not a member of ‘v8’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^~
../src/common.cc:37:46: error: expected primary-expression before ‘>’ token
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^
../src/common.cc:37:48: error: ‘obj’ was not declared in this scope
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^~~
../src/common.cc:37:65: error: expected primary-expression before ‘attr’
std::string AttrAsStr(v8::Handlev8::Object obj, std::string attr) {
^~
../src/common.cc:43:9: error: redefinition of ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’
v8::Handlev8::Object input, std::vector &buffersToPersist
^
~
In file included from ../src/common.cc:27:0:
../src/common.h:95:20: note: ‘sharp::InputDescriptor* sharp::CreateInputDescriptor’ previously defined here
InputDescriptor* CreateInputDescriptor(
^
~~~~
../src/common.cc:43:9: error: ‘Handle’ is not a member of ‘v8’
v8::Handlev8::Object input, std::vector &buffersToPersist
^
~
../src/common.cc:43:26: error: expected primary-expression before ‘>’ token
v8::Handlev8::Object input, std::vector &buffersToPersist
^
../src/common.cc:43:28: error: ‘input’ was not declared in this scope
v8::Handlev8::Object input, std::vector &buffersToPersist
^
~~
../src/common.cc:43:28: note: suggested alternative: ‘ino_t’
v8::Handlev8::Object input, std::vector &buffersToPersist
^~~
ino_t
../src/common.cc:43:70: error: expected primary-expression before ‘&’ token
v8::Handlev8::Object input, std::vector &buffersToPersist
^
../src/common.cc:43:71: error: ‘buffersToPersist’ was not declared in this scope
v8::Handlev8::Object input, std::vector &buffersToPersist
^
~~~~~
sharp.target.mk:134: recipe for target 'Release/obj.target/sharp/src/common.o' failed
make: Leaving directory '/mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp/build'
make: * [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.4.0-18362-Microsoft
gyp ERR! command "/data/node-v12.13.0-linux-x64/bin/node" "/data/node-v12.13.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /mnt/d/iot.docs.new/iot-docs-beta/node_modules/sharp

Hi, I was having this same problem in a fresh ubuntu install, I tried Installing the build essential package, but nothing seems to work, but I figure it out to install python 2.7 and after that, the problem was solved.

Was this page helpful?
0 / 5 - 0 ratings