Sage 8.6.0 - npm install fails

Hello,

I just installed a new/clean version of Sage 8.6.0.
I ran npm install as per the docs and this failed.

Tried installing with both Node v9.11.2, NPM 5.6.0 and Node v8.17.0, NPM 6.13.4.
Same result each time :frowning:

Here’s the relevant log output:

olivermcvey@Olivers-iMac-Pro ~ % cd /Volumes/Macintosh\ HD/Users/olivermcvey/Local\ Sites/sage/app/public/wp-content/themes/sage-8.6.0
olivermcvey@Olivers-iMac-Pro sage-8.6.0 % npm install
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
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
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= integrity checksum failed when using sha1: wanted sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ= but got sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==. (4249 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

> fsevents@1.2.13 install /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/glob-watcher/node_modules/fsevents
> node install.js

gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:483:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:397:16)
gyp ERR! stack     at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:170:21)
gyp ERR! System Darwin 21.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/glob-watcher/node_modules/fsevents
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 

> node-sass@3.13.1 install /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/darwin-x64-59_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v3.13.1/darwin-x64-59_binding.node": 

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g. 

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

> es5-ext@0.10.61 postinstall /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/es5-ext
>  node -e "try{require('./_postinstall')}catch(e){}" || exit 0


> node-sass@3.13.1 postinstall /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/node-sass
> node scripts/build.js

Building: /usr/local/bin/node /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/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 [ '/usr/local/bin/node',
gyp verb cli   '/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/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 info using node-gyp@3.8.0
gyp info using node@9.11.2 | 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 "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:170:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:170:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:13:12)\n    at F (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:68:19)\n    at E (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:80:29)\n    at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:89:16\n    at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/index.js:42:5\n    at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:170:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:170:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:13:12)
gyp verb `which` failed     at F (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:68:19)
gyp verb `which` failed     at E (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:80:29)
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:89:16
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/index.js:42:5
gyp verb `which` failed     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/mode.js:8:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:170:21)
gyp verb `which` failed   stack: 'Error: not found: python\n    at getNotFoundError (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:13:12)\n    at F (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:68:19)\n    at E (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:80:29)\n    at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:89:16\n    at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/index.js:42:5\n    at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/mode.js:8:5\n    at FSReqWrap.oncomplete (fs.js:170:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:80:29)
gyp ERR! stack     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/which/which.js:89:16
gyp ERR! stack     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:170:21)
gyp ERR! System Darwin 21.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/olivermcvey/Local Sites/sage/app/public/wp-content/themes/sage-8.6.0/node_modules/node-sass
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1
npm WARN ws@8.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.2.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@3.13.1 postinstall 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!     /Users/olivermcvey/.npm/_logs/2022-06-09T18_47_54_334Z-debug.log

Sage 8.6.0 should be built with Node.js >= 6.9. I would stick to 6.X although I’ve successfully compiled it with 7.10

Also take this into account:

@Hamilton_Brooke I have a few sites that are on 8.6.0 still, and while it’s not ideal, I have updated things to work… at least they do for me. Currently running Node 16.13.1, npm 8.12.1.

Beyond using later dependencies in package.json, the gulpfile.js needs to be revised to use a different SASS compiler.

Here are those two files that I have in use from some recent revisions: Updated Sage 8.6.0 build files · GitHub

2 Likes