Can't build CSS if you have npm gulp-bless version 3.1.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Unassigned |
Bug Description
If you have the npm package "gulp-bless" at version 3.1.0 (which requires the "bless" package at 4.0.0), then Mahara's SASS compilation (make css) will error out.
To replicate:
1. Clone a new Mahara repository, or in an existing Mahara repo rename your "node_modules" directory to "node_modules.bak"
2. Run "npm install" in this repo
3. Run "make css"
Expected result:
Successfully builds the CSS, with this output.
(master)
npm install
npm WARN package.json mahara-themes@1.0.0 No repository field.
npm WARN package.json gulp-minify-
Building CSS...
[13:21:16] Using gulpfile ~/www/mahara/
[13:21:16] Starting 'css'...
Compiling CSS for htdocs/theme/custom
Compiling CSS for htdocs/
Compiling CSS for htdocs/theme/modern
Compiling CSS for htdocs/theme/ocean
Compiling CSS for htdocs/
Compiling CSS for htdocs/theme/raw
Compiling CSS for htdocs/
[13:21:21] Finished 'css' after 5.72 s
Done!
Actual result:
Errors out with this output.
(master)
npm install
npm WARN package.json mahara-themes@1.0.0 No repository field.
npm WARN package.json gulp-minify-
Building CSS...
[13:22:42] Using gulpfile ~/www/mahara-
[13:22:42] Starting 'css'...
Compiling CSS for htdocs/theme/custom
Compiling CSS for htdocs/
Compiling CSS for htdocs/theme/modern
Compiling CSS for htdocs/theme/ocean
Compiling CSS for htdocs/
Compiling CSS for htdocs/theme/raw
Compiling CSS for htdocs/
events.js:72
throw er; // Unhandled 'error' event
^
TypeError: Cannot call method 'reduce' of undefined
at countRules (/home/
at count (/home/
at chunks$ (/home/
at tryCatch (/home/
at GeneratorFuncti
at GeneratorFuncti
at chunk (/home/
at Object.chunk (/home/
at Transform.
at Transform._read (/home/
npm WARN package.json mahara-themes@1.0.0 No repository field.
npm WARN package.json gulp-minify-
[13:22:46] Using gulpfile ~/www/mahara-
[13:22:46] Starting 'css'...
Compiling CSS for htdocs/theme/custom
Compiling CSS for htdocs/
Compiling CSS for htdocs/theme/modern
Compiling CSS for htdocs/theme/ocean
Compiling CSS for htdocs/
Compiling CSS for htdocs/theme/raw
Compiling CSS for htdocs/
events.js:72
throw er; // Unhandled 'error' event
^
TypeError: Cannot call method 'reduce' of undefined
at countRules (/home/
at count (/home/
at chunks$ (/home/
at tryCatch (/home/
at GeneratorFuncti
at GeneratorFuncti
at chunk (/home/
at Object.chunk (/home/
at Transform.
at Transform._read (/home/
make: *** [css] Error 8
Changed in mahara: | |
milestone: | none → 15.10.2 |
no longer affects: | mahara/16.04 |
no longer affects: | mahara/15.10 |
Changed in mahara: | |
milestone: | 16.04.1 → 16.10.0 |
no longer affects: | mahara/16.10 |
Changed in mahara: | |
milestone: | 16.10.0 → 16.10.1 |
Changed in mahara: | |
milestone: | 16.10.1 → 17.04.0 |
Changed in mahara: | |
assignee: | Aaron Wells (u-aaronw) → nobody |
milestone: | 17.04.0 → 17.10.0 |
status: | In Progress → Confirmed |
importance: | Low → High |
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
milestone: | 17.10.0 → 18.04.0 |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
As a temporary measure to get the build working again, I've pinned gulp-bless to 3.0.1 in our node "package.json" file. Commit 805fc0c4ca84366 f910c9e955e072f ade8cda45d