rails s
を実行したら
npm rebuild node-sass
npm ERR! code 1
npm ERR! path /Users/soichirohara/coffee_passport/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/bin/node /Users/soichirohara/coffee_passport/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp
failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/Users/soichirohara/coffee_passport/node_modules/node-gyp/lib/configure.js:345:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/usr/local/bin/node" "/Users/soichirohara/coffee_passport/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/soichirohara/coffee_passport/node_modules/node-sass
npm ERR! gyp ERR! node -v v17.2.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/soichirohara/.npm/_logs/2021-12-22T14_27_26_092Z-debug.log
2 warnings generated.
c++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/Users/soichirohara/.node-gyp/16.13.1/include/node -I/Users/soichirohara/.node-gyp/16.13.1/src -I/Users/soichirohara/.node-gyp/16.13.1/deps/openssl/config -I/Users/soichirohara/.node-gyp/16.13.1/deps/openssl/openssl/include -I/Users/soichirohara/.node-gyp/16.13.1/deps/uv/include -I/Users/soichirohara/.node-gyp/16.13.1/deps/zlib -I/Users/soichirohara/.node-gyp/16.13.1/deps/v8/include -I../src/libsass/include -O3 -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=c++11 -stdlib=libc++ -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/subset_map.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/subset_map.o ../src/libsass/src/subset_map.cpp
In file included from ../src/libsass/src/subset_map.cpp:2:
../src/libsass/src/ast.hpp:1614:25: warning: loop variable 'numerator' creates a copy from type 'const std::string' [-Wrange-loop-construct]
for (const auto numerator : numerators)
^
../src/libsass/src/ast.hpp:1614:14: note: use reference type 'const std::string &' to prevent copying
for (const auto numerator : numerators)
^~~~~~~~~~~~~~~~~~~~~~
&
../src/libsass/src/ast.hpp:1616:25: warning: loop variable 'denominator' creates a copy from type 'const std::string' [-Wrange-loop-construct]
for (const auto denominator : denominators)
^
../src/libsass/src/ast.hpp:1616:14: note: use reference type 'const std::string &' to prevent copying
for (const auto denominator : denominators)
^~~~~~~~~~~~~~~~~~~~~~~~
&
クソ長いエラーがでた。
yarn upgrade-interactive --latest
を実行し、aを押したあとにエンターを押したら。エラーが解決できた。
しまぶーさんのツイートみなかったら一生できなかった。。。