Hi Mitsuhiro

We've recently updated the versions of things we require for node-sass

And this relies on a newer version of node

I did the following to sort out the problem:

 sudo npm cache clean -f
 sudo npm install -g n
 sudo n 8.11.3

8.11.3 being the latest node version that works with our stack

Then update node-sass bindings with:

 sudo npm rebuild node-sass

These steps worked for me and others without having to edit any
node_modules file

Cheers

Robert

-- 
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/1785576

Title:
  Erros on building CSS for Mahara 18.10dev

Status in Mahara:
  New

Bug description:
  I have the following errors on building CSS for Mahara 18.10dev
  (2018070500).

  # cat /etc/redhat-release
  CentOS Linux release 7.5.1804 (Core)

  # node -v
  v5.12.0

  # make css
  npm install
  Building CSS...
  /git-mahara/mahara/node_modules/gulp-sass/index.js:66
      let sassMap;
      ^^^

  SyntaxError: Block-scoped declarations (let, const, function, class) not yet 
supported outside strict mode
      at exports.runInThisContext (vm.js:53:16)
      at Module._compile (module.js:387:25)
      at Object.Module._extensions..js (module.js:422:10)
      at Module.load (module.js:357:32)
      at Function.Module._load (module.js:314:12)
      at Module.require (module.js:367:17)
      at require (internal/module.js:20:19)
      at Object.<anonymous> (/git-mahara/mahara/gulpfile.js:8:12)
      at Module._compile (module.js:413:34)
      at Object.Module._extensions..js (module.js:422:10)

  
  To avoid the errors, we can add "use strict"; to index.js as below.

  File to modify:
  mahara/node_modules/gulp-sass/index.js

  Line:
  1

  [ Before ]
  const chalk = require('chalk');
  const PluginError = require('plugin-error');

  [ After ]
  "use strict";
  const chalk = require('chalk');
  const PluginError = require('plugin-error');

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1785576/+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

Reply via email to