can not run theme scss/gulp setup

Created on 27 December 2023, 6 months ago
Updated 7 February 2024, 5 months ago

Our themes Gulp/scss setup is dated gulp3) no documentation around npm version to run etc...
- packages are too old. need modernization.

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇨🇦Canada SKAUGHT

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @SKAUGHT
  • Assigned to danrod
  • 🇨🇦Canada danrod

    The file package.json needs to be updated to allow installation of npm packages for newer NodeJS releases

    {
      "name": "SShop",
      "version": "1.0.0",
      "scripts": {
        "postinstall": "find node_modules/ -name '*.info' -type f -delete"
      },
      "dependencies": {},
      "devDependencies": {
        "breakpoint-sass": "^2.7.0",
        "browser-sync": "^2.18.1",
        "compass-mixins": "^0.12.10",
        "drupal-breakpoints-scss": "^1.2.0",
        "gulp": "^3.9.1",
        "gulp-autoprefixer": "^3.1.1",
        "gulp-csscomb": "^3.0.8",
        "gulp-load-plugins": "^1.5.0",
        "gulp-plumber": "^1.1.0",
        "gulp-rename": "^1.2.2",
        "gulp-sass": "^2.3.2",
        "gulp-sourcemaps": "^2.2.0",
        "gulp-watch": "^4.3.10",
        "node-sass-globbing": "0.0.23",
        "sass-rem": "^2.0.0"
      }
    }
    

    I'm doing some tests with an old NodeJS version (v12.22.7) and I'm still can't run npm install successfully:

    17414 verbose stack Error: node-sass@3.13.1 postinstall: `node scripts/build.js`
    17414 verbose stack Exit status 1
    17414 verbose stack     at EventEmitter.<anonymous> (../versions/node/v12.22.7/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
    17414 verbose stack     at EventEmitter.emit (events.js:314:20)
    17414 verbose stack     at ChildProcess.<anonymous> (.../.nvm/versions/node/v12.22.7/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
    17414 verbose stack     at ChildProcess.emit (events.js:314:20)
    17414 verbose stack     at maybeClose (internal/child_process.js:1022:16)
    17414 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
    17415 verbose pkgid node-sass@3.13.1
    17416 verbose cwd /../websites/drupal10-2/web/themes/contrib/estore
    17417 verbose Linux 5.15.0-91-generic
    17418 verbose argv "/../.nvm/versions/node/v12.22.7/bin/node" "/../.nvm/versions/node/v12.22.7/bin/npm" "install"
    17419 verbose node v12.22.7
    17420 verbose npm  v6.14.15
    17421 error code ELIFECYCLE
    17422 error errno 1
    17423 error node-sass@3.13.1 postinstall: `node scripts/build.js`
    17423 error Exit status 1
    17424 error Failed at the node-sass@3.13.1 postinstall script.
    17424 error This is probably not a problem with npm. There is likely additional logging output above.
    17425 verbose exit [ 1, true ]
    
  • Status changed to Needs review 6 months ago
  • 🇨🇦Canada danrod

    I created a MR to fix this, I had the same issues in the SShop theme, and applied the same fix in this theme, you can see more details of what was done here: https://www.drupal.org/project/sshop/issues/3413057 🐛 can not run theme scss/gulp setup Needs review

    Please review.

  • Status changed to Needs work 6 months ago
  • 🇨🇦Canada SKAUGHT

    Dan's upgrade is nice, but I think for our own best interest we need to move toward Dart SASS. as other toolkits themselves have ridicuous node mix problems.

    • 7829f583 committed on 2.1.x
      Issue #3411055 by danrod, SKAUGHT: can not run theme scss/gulp setup....
  • Status changed to Needs review 6 months ago
  • 🇨🇦Canada SKAUGHT

    just want a wider general QA before release. my time is limited currently (:

    • 0d2bb9c0 committed on 2.2.x
      Issue #3411055 by danrod, SKAUGHT: can not run theme scss/gulp setup @2....
  • 🇨🇦Canada SKAUGHT

    @daniel.
    i've put up a much better (super compact!) package.json base for us.
    https://git.drupalcode.org/project/estore/-/blob/2.2.x/package.json?ref_...

    npm run watch only script at this moment. can evolve as we will.. cheers.

    clip post watch, diff looks expectible. site theme stable

  • 🇨🇦Canada danrod

    I was able to compile the scss with no issues, using node v16.20.2 (npm v8.19):

  • Status changed to RTBC 6 months ago
  • 🇨🇦Canada SKAUGHT

    fixed. again, on 2.1.x and 2.2.x lines now for next full release.

  • Status changed to Fixed 5 months ago
  • Issue was unassigned.
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024