maiya-22 / learning-repo__learn-11ty-from-scratch

1 stars 0 forks source link

Lesson 19: error after installing Gulp and SaSS #4

Open maiya-22 opened 1 year ago

maiya-22 commented 1 year ago

Location in lesson where error occurs:

Lesson 19: updating our npm scripts

Git branches where error is occuring:

before attempt to fix anything: https://github.com/maiya-22/learning-repo__learn-11ty-from-scratch/tree/Lesson-19

after attempt to update modules and gulpfile.js: https://github.com/maiya-22/learning-repo__learn-11ty-from-scratch/tree/Lesson-19-error-fix

instructions state to run:

npm install gulp-clean-css gulp-sass@4.1.0 sass error message in terminal message is long, so click link to see full: link to first error message

Then, after running start script as:

"scripts": { "start": "npx gulp && concurrently \"npx gulp watch\" \"npx eleventy --serve\"", },

link to second error message

Then, after attempt to install missing modules and update gulpFile.js:

> learning-repo__learn-11ty-from-scratch@1.0.0 start
> npx gulp && concurrently "npx gulp watch" "npx eleventy --serve"

[time] Using gulpfile ~/Desktop/[filepath]/learn-11ty-from-scratch/gulpfile.js
[time] Starting 'default'...
[time] Starting 'gulpSass'...
[time] The following tasks did not complete: default, gulpSass
[time] Did you forget to signal async completion?
mrmorawski commented 1 year ago

This course uses an outdated version of gulp and node, which causes those build errors. I use Ubuntu 22.10, and to get it to work, I needed to:

  1. Install python2 with apt install python2
  2. Use an older version of nodejs. Instructions for this are here. Version 14.2.3 worked for me. I installed it by running npm install node@14.21.3 from the project root folder.

Note that using older versions of node and npm packages is a security risk!