Roots Discourse

Sage 9 Beta 2: Yarn can not find webpack.config.js

I installed Sage 9 Beta 2 via the command outlined in the readme:

composer create-project roots/sage your-theme-name dev-master

After running the command “yarn” to install dependencies, I am receiving an error whenever I try and run any of the yarn scripts.

$yarn run build
yarn run v0.15.1
$ "webpack --progress --config assets/build/webpack.config.js" 
sh: webpack --progress --config assets/build/webpack.config.js: No such file or directory
error Command failed with exit code 127.

I see that the file is there, relative to the theme directory where I am issuing the command.

Any ideas what might be causing the hiccup?

Thanks for any help you can provide.

1 Like

You could try updating yarn, see if that fixes your issue.

1 Like

Thanks,

Along with updating Node that did the trick.

Mac user here. Yup sure enough I was running Yarn 0.15.1 which was the issue. Since I had installed Yarn via NPM, I had to remove it and decided to go with “brew install yarn” instead which took me up to 0.19.1 (stable) as of this comment. Works like a charm now.

1 Like

Ran into the same issue. I had installed Yarn right when it came out as a global npm package and needed to uninstall.

npm uninstall -g yarn
brew install yarn

Then in the theme folder:

yarn upgrade

2 Likes

I used the npm command to install

npm install -g yarn

and it works just fine as well