Apologies if this question is mis-directed; I just took ownership of a website whose styling and scripting assets are managed by grunt, npm, etc. This is a bit outside my wheelhouse (I'm a software developer by trade; I'm handling the website until we can hire a replacement).
I'm trying to walk myself through the process of making a change to, say, a CSS file and then recompiling the assets. (It's a drupal8 site, if that matters.)
My problem is that when I kick off this process by typing npm install from inside the custom theme directory, I see the following output:
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated graceful-fs@1.2.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated uuid@3.4.0: 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 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm ERR! code 1
npm ERR! path /Users/mefron/devel/uvamiller_local/prod/docroot/themes/custom/miller/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/Cellar/node/16.6.1/bin/node /Users/mefron/devel/uvamiller_local/prod/docroot/themes/custom/miller/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! 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' '-DLIBSASS_VERSION="3.3.6"' -I/Users/mefron/.node-gyp/16.6.1/include/node -I/Users/mefron/.node-gyp/16.6.1/src -I/Users/mefron/.node-gyp/16.6.1/deps/openssl/config -I/Users/mefron/.node-gyp/16.6.1/deps/openssl/openssl/include -I/Users/mefron/.node-gyp/16.6.1/deps/uv/include -I/Users/mefron/.node-gyp/16.6.1/deps/zlib -I/Users/mefron/.node-gyp/16.6.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/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
...
[huge dump here]
...
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.6.1/bin/node" "/Users/mefron/devel/uvamiller_local/prod/docroot/themes/custom/miller/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd /Users/mefron/devel/uvamiller_local/prod/docroot/themes/custom/miller/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.6.1
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1
And after this, listing the directory contents shows no sign of the node_modules subdir that I would expect to see, and on which I assume subsequent steps of compilation will rely.
One thing I noticed is that while I wait for npm install to complete, that node_modules is directory present and full of goodies. Somehow it's getting nuked when (or after) npm is bombing out.
Any thoughts on how I could move forward would be much appreciated.
In case it helps, details of my setup include: OS: Mac OS 11.5 node: v16.6.1 npm: 7.20.3 node and npm were installed via homebrew. I tried uninstall and re-installing them, to no avail.