material-components / material-components-web-codelabs

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

[codelab] <mdc-101 npm install not working> #250

Open JeffThurston opened 3 years ago

JeffThurston commented 3 years ago

Windows 10 Pro version 20H2 (19042.928) Visual Studio 2019 Community Edition version 16.9.3 Microsoft .NET Framework version 4.8.04084 NPM version 6.14.11

Downloaded and unpacked ZIP. CD to starter directory. Ran npm install. Last few lines from the log file shows warnings and errors.

4361 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents): 4362 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 4363 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin 4363 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any 4363 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: win32 4363 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64 4364 verbose stack Error: fibers@4.0.1 install: node build.js || nodejs build.js 4364 verbose stack Exit status 1 4364 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 4364 verbose stack at EventEmitter.emit (events.js:315:20) 4364 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 4364 verbose stack at ChildProcess.emit (events.js:315:20) 4364 verbose stack at maybeClose (internal/child_process.js:1048:16) 4364 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 4365 verbose pkgid fibers@4.0.1 4366 verbose cwd C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter 4367 verbose Windows_NT 10.0.19042 4368 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" 4369 verbose node v14.16.0 4370 verbose npm v6.14.11 4371 error code ELIFECYCLE 4372 error errno 1 4373 error fibers@4.0.1 install: node build.js || nodejs build.js 4373 error Exit status 1 4374 error Failed at the fibers@4.0.1 install script. 4374 error This is probably not a problem with npm. There is likely additional logging output above. 4375 verbose exit [ 1, true ]

JeffThurston commented 3 years ago

Updated Python to 3.9.4 Added Visual C++ Build Tools workload to Visual Studio 2019 Compiled node-gyp without error. The command npm install is still producing errors, but now they're different:

C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter>npm install

fibers@4.0.1 install C:\Users\Jeff Thurston\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers node build.js || nodejs build.js

C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch. fibers.cc coroutine.cc win_delay_load_hook.cc C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers\src\fibers.cc( 899,1): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Users\asdf\Development\Material\material -components-web-codelabs-master\mdc-101\starter\node_modules\fibers\build\fibers.vcxproj] C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers\src\fibers.cc( 903,1): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Users\asdf\Development\Material\material -components-web-codelabs-master\mdc-101\starter\node_modules\fibers\build\fibers.vcxproj] C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers\src\fibers.cc( 909,1): error C2661: 'v8::Object::Set': no overloaded function takes 2 arguments [C:\Users\asdf\Development\Material\material -components-web-codelabs-master\mdc-101\starter\node_modules\fibers\build\fibers.vcxproj] C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers\src\fibers.cc( 927,5): error C2661: 'v8::Object::Get': no overloaded function takes 1 arguments [C:\Users\asdf\Development\Material\material -components-web-codelabs-master\mdc-101\starter\node_modules\fibers\build\fibers.vcxproj] C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers\src\coroutine. cc(153,2): warning C4552: '!': result of expression not used [C:\Users\asdf\Development\Material\material-components-web-code labs-master\mdc-101\starter\node_modules\fibers\build\fibers.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\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:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Windows_NT 10.0.19042 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 C:\Users\asdf\Development\Material\material-components-web-codelabs-master\mdc-101\starter\node_modules\fibers gyp ERR! node -v v14.16.1 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok 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++ 'nodejs' is not recognized as an internal or external command, operable program or batch file. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! fibers@4.0.1 install: node build.js || nodejs build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the fibers@4.0.1 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! C:\Users\asdf\AppData\Roaming\npm-cache_logs\2021-04-15T21_45_56_310Z-debug.log

tuchang commented 2 years ago

Fibers will not be supported on nodejs v16.x or higher.
https://github.com/laverdet/node-fibers/issues/451