firebase / firebaseui-web

FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
https://firebase.google.com/
Apache License 2.0
4.58k stars 1.06k forks source link

Can't install due to error building node-sass #716

Closed InterestedInTechAndCake closed 1 year ago

InterestedInTechAndCake commented 4 years ago

The problem:

  1. git clone https://github.com/firebase/firebaseui-web.git
  2. cd firebaseui-web
  3. npm install firebase --save
  4. ../src/binding.cpp ../src/binding.cpp: In function ‘void MakeCallback(uv_work_t)’: ../src/binding.cpp:246:39: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local) const’ is d ctx_w->success_callback->Call(0, 0); ^ In file included from ../src/binding.cpp:1:0: ../../nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/binding.cpp:254:40: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local) const’ is d ctx_w->error_callback->Call(1, argv); ^ In file included from ../src/binding.cpp:1:0: ../../nan/nan.h:1740:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ In file included from ../src/custom_function_bridge.h:7:0, from ../src/sass_context_wrapper.h:9, from ../src/binding.cpp:3: ../src/callback_bridge.h: In instantiation of ‘T CallbackBridge<T, L>::operator()(std::vector<void>) [with T = Sass_ ../src/binding.cpp:19:21: required from here ../src/callback_bridge.h:111:5: warning: ‘v8::Local Nan::Callback::Call(int, v8::Local*) const’ns] ); ^

binding.target.mk:131: recipe for target 'Release/obj.target/binding/src/create_string.o' failed make: *** [Release/obj.target/binding/src/create_string.o] Error 1 make: Leaving directory '$HOME/firebaseui-web/node_modules/node-sass/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit ($HOME/firebaseui-web/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Linux 4.9.0-11-amd64 gyp ERR! command "/usr/bin/node" "$HOME/firebaseui-web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "-flags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd $HOME/firebaseui-web/node_modules/node-sass gyp ERR! node -v v14.3.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: google-closure-compiler-osx@20190415.0.0 (node_modules/google-closure npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for google-closure-compiler-osx@20190415.0.0: wantrrent: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/glob-watcher/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@3.13.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
viralcaptis commented 4 years ago

Operating System version: Darwin Browser version: n/a Firebase UI version: n/a Firebase SDK version: n/a The problem:

git clone https://github.com/firebase/firebaseui-web.git cd firebaseui-web npm install firebase --save 1 error generated. make: *** [Release/obj.target/binding/src/create_string.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/viral/projects/firebaseui-web/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Darwin 16.7.0 gyp ERR! command "/usr/local/bin/node" "/Users/viral/projects/firebaseui-web/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /Users/viral/projects/firebaseui-web/node_modules/node-sass gyp ERR! node -v v12.18.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: google-closure-compiler-linux@20190415.0.0 (node_modules/google-closure-compiler-linux): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for google-closure-compiler-linux@20190415.0.0: wanted {"os":"linux","arch":"x64,x86"} (current: {"os":"darwin","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@3.13.1 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@3.13.1 postinstall 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/viral/.npm/_logs/2020-06-05T16_53_59_321Z-debug.log

thomasmburke commented 4 years ago

Think these issues are related to https://stackoverflow.com/a/56035814/9586164. I ran into a similar error and ultimately believe it is due to node-sass not having support for node 12 until version 4.12. This repository uses and older version of node-sass as it is a dependency of gulp-sass.

The solution for the repository owner may just be as simple as upgrading the version of gulp-sass used.

Until this repo sees an update it appears there may be two workarounds. Either downgrade to node version 10 or update the gulp-sass version in the package.json to the latest version before running npm install to ensure a newer version of node-sass is pulled in.

rosalyntan commented 4 years ago

Filed b/161813849 for internal tracking.

BigBoulard commented 3 years ago

any update on this?

jhuleatt commented 1 year ago

Fixed by #927