** Changed in: mahara Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1560739
Title: Can't build CSS if you have npm gulp-bless version 3.1.0 Status in Mahara: Fix Released 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)aaronw@vegas:~/www/mahara$ make css npm install npm WARN package.json mahara-themes@1.0.0 No repository field. npm WARN package.json gulp-minify-css@1.2.4 No repository field. Building CSS... [13:21:16] Using gulpfile ~/www/mahara/gulpfile.js [13:21:16] Starting 'css'... Compiling CSS for htdocs/theme/custom Compiling CSS for htdocs/theme/default Compiling CSS for htdocs/theme/modern Compiling CSS for htdocs/theme/ocean Compiling CSS for htdocs/theme/primaryschool Compiling CSS for htdocs/theme/raw Compiling CSS for htdocs/theme/subthemestarter [13:21:21] Finished 'css' after 5.72 s Done! Actual result: Errors out with this output. (master)aaronw@vegas:~/www/mahara-test$ make css npm install npm WARN package.json mahara-themes@1.0.0 No repository field. npm WARN package.json gulp-minify-css@1.2.4 No repository field. Building CSS... [13:22:42] Using gulpfile ~/www/mahara-test/gulpfile.js [13:22:42] Starting 'css'... Compiling CSS for htdocs/theme/custom Compiling CSS for htdocs/theme/default Compiling CSS for htdocs/theme/modern Compiling CSS for htdocs/theme/ocean Compiling CSS for htdocs/theme/primaryschool Compiling CSS for htdocs/theme/raw Compiling CSS for htdocs/theme/subthemestarter events.js:72 throw er; // Unhandled 'error' event ^ TypeError: Cannot call method 'reduce' of undefined at countRules (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/count.js:26:18) at count (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/count.js:44:14) at chunks$ (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/chunk.js:52:46) at tryCatch (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/node_modules/babel-runtime/regenerator/runtime.js:72:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/node_modules/babel-runtime/regenerator/runtime.js:334:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/node_modules/babel-runtime/regenerator/runtime.js:105:21) at chunk (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/chunk.js:98:113) at Object.chunk (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/index.js:34:33) at Transform._transform (/home/aaronw/www/mahara-test/node_modules/gulp-bless/index.js:33:36) at Transform._read (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10) npm WARN package.json mahara-themes@1.0.0 No repository field. npm WARN package.json gulp-minify-css@1.2.4 No repository field. [13:22:46] Using gulpfile ~/www/mahara-test/gulpfile.js [13:22:46] Starting 'css'... Compiling CSS for htdocs/theme/custom Compiling CSS for htdocs/theme/default Compiling CSS for htdocs/theme/modern Compiling CSS for htdocs/theme/ocean Compiling CSS for htdocs/theme/primaryschool Compiling CSS for htdocs/theme/raw Compiling CSS for htdocs/theme/subthemestarter events.js:72 throw er; // Unhandled 'error' event ^ TypeError: Cannot call method 'reduce' of undefined at countRules (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/count.js:26:18) at count (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/count.js:44:14) at chunks$ (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/chunk.js:52:46) at tryCatch (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/node_modules/babel-runtime/regenerator/runtime.js:72:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/node_modules/babel-runtime/regenerator/runtime.js:334:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/node_modules/babel-runtime/regenerator/runtime.js:105:21) at chunk (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/chunk.js:98:113) at Object.chunk (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/bless/lib/index.js:34:33) at Transform._transform (/home/aaronw/www/mahara-test/node_modules/gulp-bless/index.js:33:36) at Transform._read (/home/aaronw/www/mahara-test/node_modules/gulp-bless/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10) make: *** [css] Error 8 To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1560739/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp