$ yarn run start produces SyntaxError: Unexpected token {

I am new to sage 9 and am using it for the first time. I went the composer route as suggested on the theme documentation. I ran $ composer install from the theme directory and $ yarn already. It looks like things installed correctly, but don’t know enough about yarn or webpack to troubleshoot this myself. Any suggestions?

When I run $ yarn run start I get the following:

`yarn run v0.21.3
$ webpack --hide-modules --watch --config assets/build/webpack.config.js
const { promisify } = webpack_require(0);

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. (/home/ubuntu/workspace/allcleared-content/wp-content/themes/allcleared-theme/assets/build/webpack.config.js:10:25)
at Module._compile (module.js:409:26)
at Object.Module._extensions…js (module.js:416:10)
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.

Check your node.js version :wink:

1 Like