Error regarding node-sass after upgrading Node and packages
> yarn upgrade yarn upgrade v1.22.10 [1/4] π Resolving packages... warning @rails/webpacker > node-sass > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning @rails/webpacker > node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 warning @rails/webpacker > node-sass > request > har-validator@5.1.5: this library is no longer supported warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated warning webpack-dev-server > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. [2/4] π Fetching packages... [3/4] π Linking dependencies... warning " > webpack-dev-server@3.11.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0". [4/4] π¨ Rebuilding all packages... [1/3] β fsevents [-/3] β waiting... error /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass: Command failed. Exit code: 1 Command: node scripts/build.js Arguments: Directory: /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass Output: Building: /usr/local/Cellar/node/15.0.1/bin/node /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli '/usr/local/Cellar/node/15.0.1/bin/node', gyp verb cli '/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-gyp/bin/node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' gyp verb cli ] gyp info using node-gyp@3.8.0 gyp info using node@15.0.1 | darwin | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "/usr/bin/python" in the PATH gyp verb `which` succeeded /usr/bin/python /usr/bin/python gyp verb check python version `/usr/bin/python -c "import sys; print "2.7.16 gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j gyp verb get node dir no --target version specified, falling back to host node version: 15.0.1 gyp verb command install [ '15.0.1' ] gyp verb install input version string "15.0.1" gyp verb install installing version: 15.0.1 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version is already installed, need to check "installVersion" gyp verb got "installVersion" 9 gyp verb needs "installVersion" 9 gyp verb install version is good gyp verb get node dir target node version installed: 15.0.1 gyp verb build dir attempting to create "build" dir: /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass/build gyp verb build dir "build" dir needed to be created? /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass/build gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass/build/config.gypi gyp verb config.gypi checking for gypi file: /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass/config.gypi gyp verb common.gypi checking for gypi file: /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass/common.gypi gyp verb gyp gyp format was not specified; forcing "make" gyp info spawn /usr/bin/python gyp info spawn args [ gyp info spawn args '/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/User/USER/.node-gyp/15.0.1/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/User/USER/.node-gyp/15.0.1', gyp info spawn args '-Dnode_gyp_dir=/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/User/USER/.node-gyp/15.0.1/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-gyp/lib/configure.js:345:16) gyp ERR! stack at ChildProcess.emit (node:events:327:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:277:12) gyp ERR! System Darwin 19.6.0 gyp ERR! command "/usr/local/Cellar/node/15.0.1/bin/node" "/User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /User/USER/Dropbox/Projects/PROJECT/ruby/PROJECT/node_modules/node-sass gyp ERR! node -v v15.0.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok
Anyone else getting this error? I ran
brew upgrade
, which upgraded Node to version 15.0.1 and then ran yarn upgrade
. Looks like rails webpacker still requires node-sass.
> yarn why node-sass yarn why v1.22.10 [1/4] π€ Why do we have the module "node-sass"...? [2/4] π Initialising dependency graph... [3/4] π Finding dependency... [4/4] π‘ Calculating file sizes... => Found "node-sass@4.14.1" info Reasons this module exists - "@rails#webpacker" depends on it - Hoisted from "@rails#webpacker#node-sass" info Disk size without dependencies: "3.19MB" info Disk size with unique dependencies: "13.5MB" info Disk size with transitive dependencies: "24.71MB" info Number of shared dependencies: 78 β¨ Done in 1.20s.
Any ideas? I couldn't find a suitable answer on the repo's GitHub Issues section.
After digging further into this issue, it seems like all I had to do was run:
sudo xcode-select --reset
Everything seems to be working now. If anyone happens to run into this problem, give this a whirl and hopefully it will fix things :)
Notifications
Youβre not receiving notifications from this thread.