问题
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.
回答1:
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.
回答2:
I had the same issue. Here are the steps I took:
- Clear the cache
sudo npm cache clean -f
- Install a helper
sudo npm install -g n
- Install the latest stable version of Node
sudo n stable
Found this previous post
来源:https://stackoverflow.com/questions/44208382/cant-create-a-new-project-with-foundation-css