material-components / material-components-web-codelabs

Codelabs for Material Components for Web (MDC Web)
MIT License
128 stars 101 forks source link

[codelab] material-components-web-codelabs-master/mdc-101/starter broken #296

Open kagarmoe opened 3 years ago

kagarmoe commented 3 years ago

Tried both cloning & downloading.

macOS Big Sur 11.4 npm 7.19.1

Here's the output:

kimberlygarmoe@MCSEAGARMOE:/Users/kimberlygarmoe/Desktop/material-components-web-codelabs-master/mdc-101/starter $ npm install
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN deprecated fsevents@1.2.7: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated set-value@2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated mixin-deep@1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest version.
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated chokidar@2.1.2: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm WARN deprecated dart-sass@1.25.0: This package has been renamed to 'sass'.
npm WARN deprecated core-js@2.6.5: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! code 127
npm ERR! path /Users/kimberlygarmoe/Desktop/material-components-web-codelabs-master/mdc-101/starter/node_modules/fibers
npm ERR! command failed
npm ERR! command sh -c node build.js || nodejs build.js
npm ERR! CXX(target) Release/obj.target/fibers/src/fibers.o
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@16.5.0 | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.6 found at "/usr/local/opt/python@3.9/bin/python3.9"
npm ERR! (node:44045) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/local/opt/python@3.9/bin/python3.9
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/local/lib/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   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/kimberlygarmoe/Desktop/material-components-web-codelabs-master/mdc-101/starter/node_modules/fibers/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.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=/Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/kimberlygarmoe/Desktop/material-components-web-codelabs-master/mdc-101/starter/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   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/fibers.cc:899:12: error: no matching member function for call to 'Set'
npm ERR!                         target->Set(sym_yield, yield);
npm ERR!                         ~~~~~~~~^~~
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3945:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3948:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! ../src/fibers.cc:903:8: error: no matching member function for call to 'Set'
npm ERR!                         fn->Set(sym_yield, yield);
npm ERR!                         ~~~~^~~
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3945:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3948:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! ../src/fibers.cc:909:12: error: no matching member function for call to 'Set'
npm ERR!                         target->Set(uni::NewLatin1Symbol(isolate, "Fiber"), fn);
npm ERR!                         ~~~~~~~~^~~
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3945:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
npm ERR!                                     ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3948:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR!   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
npm ERR!                                     ^
npm ERR! ../src/fibers.cc:927:27: error: no matching member function for call to 'Get'
npm ERR!         if (did_init || !target->Get(uni::NewLatin1Symbol(isolate, "Fiber"))->IsUndefined()) {
npm ERR!                          ~~~~~~~~^~~
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3992:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:3995:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR!   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR!                                           ^
npm ERR! ../src/fibers.cc:206:25: error: no matching member function for call to 'Set'
npm ERR!                 info.GetReturnValue().Set(handle);
npm ERR!                 ~~~~~~~~~~~~~~~~~~~~~~^~~
npm ERR! ../src/fibers.cc:838:17: note: in instantiation of function template specialization 'uni::Return<v8::Object>' requested here
npm ERR!                                 return uni::Return(current->handle, info);
npm ERR!                                             ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4517:18: note: candidate function not viable: no known conversion from 'Persistent<v8::Object>' to 'bool' for 1st argument
npm ERR!   V8_INLINE void Set(bool value);
npm ERR!                  ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4518:18: note: candidate function not viable: no known conversion from 'Persistent<v8::Object>' to 'double' for 1st argument
npm ERR!   V8_INLINE void Set(double i);
npm ERR!                  ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4519:18: note: candidate function not viable: no known conversion from 'Persistent<v8::Object>' to 'int32_t' (aka 'int') for 1st argument
npm ERR!   V8_INLINE void Set(int32_t i);
npm ERR!                  ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4520:18: note: candidate function not viable: no known conversion from 'Persistent<v8::Object>' to 'uint32_t' (aka 'unsigned int') for 1st argument
npm ERR!   V8_INLINE void Set(uint32_t i);
npm ERR!                  ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4511:18: note: candidate template ignored: could not match 'Global' against 'Persistent'
npm ERR!   V8_INLINE void Set(const Global<S>& handle);
npm ERR!                  ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4513:18: note: candidate template ignored: could not match 'BasicTracedReference' against 'Persistent'
npm ERR!   V8_INLINE void Set(const BasicTracedReference<S>& handle);
npm ERR!                  ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4515:18: note: candidate template ignored: could not match 'Local' against 'Persistent'
npm ERR!   V8_INLINE void Set(const Local<S> handle);
npm ERR!                  ^
npm ERR! /Users/kimberlygarmoe/Library/Caches/node-gyp/16.5.0/include/node/v8.h:4530:18: note: candidate template ignored: could not match 'S *' against 'Persistent<v8::Object>'
npm ERR!   V8_INLINE void Set(S* whatever);
npm ERR!                  ^
npm ERR! 5 errors generated.
npm ERR! make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.5.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.5.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
npm ERR! gyp ERR! cwd /Users/kimberlygarmoe/Desktop/material-components-web-codelabs-master/mdc-101/starter/node_modules/fibers
npm ERR! gyp ERR! node -v v16.5.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! sh: nodejs: command not found

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/kimberlygarmoe/.npm/_logs/2021-07-20T05_27_17_871Z-debug.log
kimberlygarmoe@MCSEAGARMOE:/Users/kimberlygarmoe/Desktop/material-components-web-codelabs-master/mdc-101/starter $ 
Jackmt9 commented 3 years ago

Likely, you need to downgrade or adjust your node version. To do so, use nvm by running nvm install 10. Now try npm install again.

I was facing a similar issue and this worked for me.

bradmonk commented 3 years ago

According to the fibers repo, as of "April 13th, 2021 -- Fibers is not compatible with nodejs v16.0.0 or later." Also see "NOTE OF OBSOLESCENCE"

cnovak commented 2 years ago

+1 to this issue, I am using: node v16.14.0