foundation-cli icon indicating copy to clipboard operation
foundation-cli copied to clipboard

SyntaxError: Unexpected token *

Open wratke opened this issue 7 years ago • 9 comments

I've installed the foundation cli without any errors (with this command: npm install --global foundation-cli), but when I try to run foundation I get the following error. I've tried uninstalling and reinstalling foundation cli but I always get the same error when I try to run foundation.

C:\Users...\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\string-kit\lib\format.js:521 base = round( n / ( 1000 ** logDiv3 ) , roundStep[ logMod ] ) ; ^

SyntaxError: Unexpected token * at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users...\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\string-kit\lib\string.js:61:2)

wratke avatar Jun 21 '18 19:06 wratke

Hi, which Node.js version do you use? Can you check if a .babelrc file exists and provide more info about the configuration files?

DanielRuf avatar Jun 28 '18 05:06 DanielRuf

Same here:

λ foundation new --framework emails C:\Users...\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\string-kit\lib\format.js:521 base = round( n / ( 1000 ** logDiv3 ) , roundStep[ logMod ] ) ; ^ SyntaxError: Unexpected token * at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users...\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\string-kit\lib\string.js:61:2) at Module._compile (module.js:570:32)

λ npm -v 6.1.0

λ node -v v10.5.0

AvigdorB avatar Jun 28 '18 13:06 AvigdorB

I have version 6.11.3 of node.js installed. Am I looking for the .babelrc in the foundation cli files, or in the node.js installation? If you let me know where to look I can see if it exists.

wratke avatar Jun 28 '18 16:06 wratke

Please try Node.js 8 or 10.

DanielRuf avatar Jun 28 '18 18:06 DanielRuf

Other things don't work with Node.js 8 or 10 :( I also keep getting: C:\Users\angel\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\string-kit\lib\format.js:624 base = round( n / ( 1000 ** logDiv3 ) , roundStep[ logMod ] ) ; ^

SyntaxError: Unexpected token * at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\angel\AppData\Roaming\npm\node_modules\foundation-cli\node_modules\string-kit\lib\string.js:61:2)

with any foundation-cli command :(

AlexMarcoDAngelo avatar Sep 21 '18 17:09 AlexMarcoDAngelo

Did you upgrade Node.js and npm and reinstall the dependencies?

DanielRuf avatar Sep 21 '18 20:09 DanielRuf

Yes, I did, now the build fsils

AlexMarcoDAngelo avatar Sep 21 '18 20:09 AlexMarcoDAngelo

Please provide more info what exactly fails and what the error message is now.

DanielRuf avatar Sep 21 '18 21:09 DanielRuf

here it is: https://github.com/zurb/foundation-cli/issues/108#issue-362705522

AlexMarcoDAngelo avatar Sep 21 '18 22:09 AlexMarcoDAngelo