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

"gyp ERR! This is a bug in node-gyp." #1546

Closed
rightaway opened this issue Sep 18, 2018 · 10 comments
Closed

"gyp ERR! This is a bug in node-gyp." #1546

rightaway opened this issue Sep 18, 2018 · 10 comments

Comments

@rightaway
Copy link

I got this error while running a yarn build, the output says it's a bug in node-gyp.

Another issue is that it exited with a 0 error code, I suppose that's an issue with yarn and not here? So the rest of my build script continued instead of failing.

  • Node Version: v10.10.0, yarn 1.9.4
  • Platform: 4.9.0-7-amd64 Make 0.6.x work #1 SMP Debian 4.9.110-1 (2018-07-05) x86_64 GNU/Linux
  • Compiler:
    Using built-in specs.
    COLLECT_GCC=cc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
Verbose output (from npm or node-gyp):

yarn install v1.9.4                                                                                                                                                                                                                                               
[1/4] Resolving packages...
[2/4] Fetching packages...
[------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/216
(node:10986) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.                                                                                                       
[3/4] Linking dependencies...
[4/4] Building fresh packages...
error .../node_modules/sharp: Command failed.
Exit code: 7
Command: node-gyp rebuild
Arguments:
Directory: .../node_modules/sharp
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn ENOMEM
gyp ERR! stack     at ChildProcess.spawn (internal/child_process.js:358:11)
gyp ERR! stack     at Object.spawn (child_process.js:533:9)
gyp ERR! stack     at Gyp.spawn (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:180:26)
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:334:20
gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:155:5)
gyp ERR! System Linux 4.9.0-7-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd .../node_modules/sharp
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
@bnoordhuis
Copy link
Member

gyp ERR! stack Error: spawn ENOMEM

Not really a node-gyp bug. The system ran out of memory.

@rightaway
Copy link
Author

What about the exit code being 0 in the failure case?

@Cubelaster
Copy link

Cubelaster commented Aug 7, 2019

Got the identical error on npm install. Makes no sense. This needs to be resolved. I have 32GB RAM, only 15% used.

@james-burkill
Copy link

james-burkill commented Jan 7, 2020

Getting the same error. Definitely not out of memory.

@RookTKO
Copy link

RookTKO commented Mar 4, 2020

Can someone explain to me why this got closed? I'm having a similar issue and I can definitely say it's not a memory issue.

@cclauss
Copy link
Contributor

cclauss commented Mar 4, 2020

Are you using [email protected] like the original post?

@RookTKO
Copy link

RookTKO commented Mar 5, 2020

@cclauss yup!

@cclauss
Copy link
Contributor

cclauss commented Mar 5, 2020

Could you please retry with something a bit more modern?
https://github.com/nodejs/node-gyp/releases

@RookTKO
Copy link

RookTKO commented Mar 6, 2020

@cclauss I would if I could. I found a workaround to the issue by getting an older version of node. node 10 specifically.

@1019588237
Copy link

image
image

@nodejs nodejs locked as resolved and limited conversation to collaborators Dec 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants