foundation-sites icon indicating copy to clipboard operation
foundation-sites copied to clipboard

Update zurb foundation template gulpfile (undefined variable)

Open MegaKeegMan opened this issue 1 year ago • 2 comments

Expected Behavior

I should be able to run gulp to compile my css from the template.

Current Behavior

I run into an error:

webpack 5.61.0 compiled successfully
[13:18:40] Finished 'javascript' after 2.13 s
[13:18:40] Starting 'sassBuild'...
[13:18:40] 'sassBuild' errored after 2.15 ms
[13:18:40] TypeError: The "listener" argument must be of type function. Received undefined
at checkListener (node:events:276:3)
at _addListener (node:events:552:3)
at Transform.addListener (node:events:611:10)
at Transform.on (node:internal/streams/readable:1126:35)
at sassBuild (/home/megakeegman/Projects/github/drupal-pece/web/themes/contrib/foundation_zurb_template/gulpfile.babel.js:105:6)
at bound (node:domain:432:15)
at runBound (node:domain:443:12)
at asyncRunner (/home/megakeegman/Projects/github/drupal-pece/web/themes/contrib/foundation_zurb_template/node_modules/async-done/index.js:55:18)
at processTicksAndRejections (node:internal/process/task_queues:77:11)

Possible Solution

Either constrain node to an earlier version (I am running 21.7.3 but have seen this work on 18), or update the code in the template gulpfile by changing $.sass.logError to sass.logError

In the template, this is being passed as a callback to a listener and is undefined. It works fine when I make this change on my version of node. Have not yet tested on earlier versions. My guess that this is the more desirable solution though.

Test Case and/or Steps to Reproduce (for bugs)

How to reproduce:

  1. Install node version 21.7.3
  2. Clone the ZURB Foundation template
  3. cd into the template folder
  4. run npm install or yarn install
  5. run npm run start or yarn run gulp
  6. See the error described

Context

Just trying to get a drupal project started with the zurb foundation theme.

Your Environment

  • I just cloned the template, which installs the latest version of Foundation
  • Device, Operating System and version: Framework laptop, Garuda Linux x86_64, Laptop (12th Gen Intel Core) A6

Checklist

  • [x] I have read and follow the CONTRIBUTING.md document.
  • [x] This is a bug report or a feature request.
  • [x] There are no other issues similar to this one.
  • [x] The issue title and template are correctly filled.

MegaKeegMan avatar Apr 26 '24 21:04 MegaKeegMan

Just trying to get a drupal project started with the zurb foundation theme.

I wouldn't recommend starting new projects with Foundation. It's barely maintained.

ameotoko avatar Apr 28 '24 10:04 ameotoko

Dang I was so excited to try it out. Thanks for bringing this to attention here.

MegaKeegMan avatar Apr 29 '24 04:04 MegaKeegMan

Use gulp build to compile into your CSS

joeworkman avatar Sep 27 '24 17:09 joeworkman