WordPress / five-for-the-future

Plugins and themes for the Five for the Future subsite
https://wordpress.org/five-for-the-future/
44 stars 21 forks source link

Fix theme build process #234

Closed iandunn closed 2 months ago

iandunn commented 10 months ago

on w.org sandbox:

> npm i
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 stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
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 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 svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm ERR! code 1
npm ERR! path sync/5ftf/git/themes/wporg-5ftf/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/node/node-v18.18.0-linux-x64/bin/node sync/5ftf/git/themes/wporg-5ftf/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! make: Entering directory 'sync/5ftf/git/themes/wporg-5ftf/node_modules/node-sass/build'
npm ERR!   g++ -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp '-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_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I.cache/node-gyp/18.18.0/include/node -I.cache/node-gyp/18.18.0/src -I.cache/node-gyp/18.18.0/deps/openssl/config -I.cache/node-gyp/18.18.0/deps/openssl/openssl/include -I.cache/node-gyp/18.18.0/deps/uv/include -I.cache/node-gyp/18.18.0/deps/zlib -I.cache/node-gyp/18.18.0/deps/v8/include -I../src/libsass/include  -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++17 -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw   -c

Maybe related to https://make.wordpress.org/systems/2023/02/09/upgrade-nodejs-npm-on-the-build-server/ ?

locally:

> nr build

> wporg-5ftf@1.0.0 build
> grunt build

Loading "Gruntfile.js" tasks...ERROR
>> Error: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Node.js 14.x
>> For more information on which environments are supported please see:
>> https://github.com/sass/node-sass/releases/tag/v5.0.0
Warning: Task "build" not found. Use --force to continue.

Aborted due to warnings.

In both cases node-sass seems to be what's failing, but for different reasons. Upgrading may fix both, but IIRC may entail other changes. Modernizing the whole thing would be nice, but probably not worth the time investment.

pkevan commented 2 months ago

fixed in #263