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

"node-gyp exited with code" error when installing Fibers #436

Open
marknotton opened this issue Mar 15, 2020 · 8 comments
Open

"node-gyp exited with code" error when installing Fibers #436

marknotton opened this issue Mar 15, 2020 · 8 comments

Comments

@marknotton
Copy link

I require Fibers so I can use the Dart Sass compiler for the Gulp Sass plugin.

npm: 6.13.7
node: 13.11.0
fibers: 4.0.2
gulp-sass: 4.0.2
MacOS Catalina: 10.15

It would seem the reoccurring "solution" I'm seeing online is to downgrade to node 11. This isn't a viable option for us really.

node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'` 
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! fibers@4.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the fibers@4.0.2 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!     /Volumes/Mark Notton/.npm/_logs/2020-03-15T14_53_33_640Z-debug.log
@jamesgibson14
Copy link

same situation, I am on MacOs Catalina 10.15. I have tried all of the options here: https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md and it didn't work. I am on Node 12.16.1

@Lofter1
Copy link

Lofter1 commented Mar 27, 2020

same here with node 13.X on linux. for some reason, only LTS versions are supported it seems

If you are running nodejs version 10.x or 12.x on Linux, OS X, or Windows (7 or later) then you should be able to install fibers from npm just fine. If you are running nodejs v8.x then you will need to use npm install fibers@3. If you are running nodejs v6.x then you will need to use npm install fibers@2. For nodejs v4.x you can use npm install fibers@1. If you are running an older (or newer) version of node or some other operating system you will have to compile fibers on your system.

So you probably have to compile it yourself. I don't know why we have to, though, if it obviously compiles (i just tried).

@EricRabil
Copy link

EricRabil commented Mar 28, 2020

Node 12 seems to be an LTS and doesn't work with fibers either. :/

@tcf909
Copy link

tcf909 commented Mar 28, 2020 via email

@pahval
Copy link

pahval commented Aug 22, 2020

i get this when i want to use with nuxtjs:

***AppData\\Local\\node-gyp\\Cache\\14.7.0\\x64\\node.lib : fatal error LNK1127: library is corrupt ***\node_modules\@nuxtjs\vuetify\node_modules\fibers\build\fibers.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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.18362
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" "--release" 
gyp ERR! cwd ***\node_modules\@nuxtjs\vuetify\node_modules\fibers
gyp ERR! node -v v14.7.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-gyp exited with code: 1

@thomasschuiki
Copy link

Hi,

I was also stuck with this issue. I had recently upgraded to nodejs v15 and didn't check my dependencies. After downgrading to nodejs v14 again, the error remained despite working before.

What stood out to me where these lines in the error message:

sh: warning: setlocale: LC_ALL: cannot change locale (en-US)
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en-US)
gyp: Call to 'ldd --version 2>&1 | head -n1 | grep "musl" | wc -l' returned exit status 0 while in binding.gyp. while trying to load binding.gyp

I then tried switching from fish-shell to a bash-shell and was able to install fibers again.

Hope this helps anyone else.

System Info:

Linux 5.8.18-1-MANJARO
node v14.12.0
npm  v6.14.8 
node-gyp v5.1.0
fibers@4.0.3 

@Alluuu
Copy link

Alluuu commented Mar 1, 2021

I'm also having trouble with fibers during npm install on a project, hasn't happened before on the sam project.

Log is here:

C:\Stuff\project>npm install
npm ERR! code 1
npm ERR! path C:\Stuff\project\node_modules\fibers
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node build.js || nodejs build.js
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR!   fibers.cc
npm ERR! C:\Stuff\project\node_modules\fibers\src\fibers.cc(899,1): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Stuff\project\node_modules\fibers\build\fibers.vcxproj]
npm ERR! C:\Stuff\project\node_modules\fibers\src\fibers.cc(903,1): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Stuff\project\node_modules\fibers\build\fibers.vcxproj]
npm ERR! C:\Stuff\project\node_modules\fibers\src\fibers.cc(909,1): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Stuff\project\node_modules\fibers\build\fibers.vcxproj]
npm ERR! C:\Stuff\project\node_modules\fibers\src\fibers.cc(927,5): error C2661: 'v8::Object::Get': no overloaded function takes 1 arguments [C:\Stuff\project\node_modules\fibers\build\fibers.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@14.16.0 | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.18 found at "C:\Users\User\anaconda3\envs\Python2.7\python.exe"
npm ERR! gyp info find VS using VS2019 (16.8.31019.35) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\User\anaconda3\envs\Python2.7\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'msvs',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Stuffproject\\node_modules\\fibers\\build\\config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   'C:\\Users\\User\\AppData\\Local\\node-gyp\\Cache\\14.16.0\\include\\node\\common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=C:\\Users\\User\\AppData\\Local\\node-gyp\\Cache\\14.16.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\User\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.16.0\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Stuff\\project\\node_modules\\fibers',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'C:\\Stuff\\project\\node_modules\\fibers\\build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'build/binding.sln',
npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args   '/nologo',
npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\User\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd C:\Stuff\project\node_modules\fibers
npm ERR! gyp ERR! node -v v14.16.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-gyp exited with code: 1
npm ERR! Please make sure you are using a supported platform and node version. If you
npm ERR! would like to compile fibers on this machine please make sure you have setup your
npm ERR! build environment--
npm ERR! Windows + OS X instructions here: https://github.com/nodejs/node-gyp
npm ERR! Ubuntu users please run: `sudo apt-get install g++ build-essential`
npm ERR! RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
npm ERR! Alpine users please run: `sudo apk add python make g++`
npm ERR! 'nodejs' is not recognized as an internal or external command,
npm ERR! operable program or batch file.

I feel like I've tried everything, different combinations of python and visual studio build tools versions.

@Alluuu
Copy link

Alluuu commented Mar 1, 2021

I can see that the version of fibers being tried to install is 4.0.1, and there truly are the set and get methods with mentioned argumetn counts, that are no longer present in 5.0.0.

However where could I find what version of vs build tools is required by 4.0.1? Because I can not get it to work with either 2017 nor 2019.

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

8 participants