6

I'm just started with Foundation CSS framework. All installation was fine, but when I'm trying to create my first project, I received this error.

foundation new
/usr/local/lib/node_modules/foundation-cli/lib/commands/info.js:7
module.exports = function(args = {}) {
                               ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/foundation-cli/lib/index.js:4:9)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Thanks all.

Yangshun Tay
  • 49,270
  • 33
  • 114
  • 141
Enrique
  • 95
  • 5

2 Answers2

2

It looks like your nodejs is outdated. Check what version you're running. If it's older than 6, ugrade and remove the older version. It should work.

0

I had the same issue. Here are the steps I took:

  1. Clear the cache sudo npm cache clean -f
  2. Install a helper sudo npm install -g n
  3. Install the latest stable version of Node sudo n stable

Found this previous post