Roots Discourse

Fixed: Error on yarn start: Tapable.plugin is deprecated

sage9

#1

Hi all,

After I have tried to install sage on a lot of different node versions I keep on ending up getting an error on “yarn start”

Its a clean install on an empty WordPress. I’m currently using Node 8.9.0

git clone https://github.com/roots/sage . (OK)
yarn (OK)
yarn start (FAIL)

One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:

  • webpack-cli (https://github.com/webpack/webpack-cli)
    The original webpack full-featured CLI.
    We will use “yarn” to install the CLI via “yarn add -D”.
    Do you want to install ‘webpack-cli’ (yes/no):

I have tried to say “no”, but that dosen’t help me.

So after installing webpack-cli, I end up with this message:

yarn start v0.27.5
$ webpack --hide-modules --watch --config resources/assets/build/webpack.config.js

webpack is watching the files…

(node:13252) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
TypeError: result.setExpression is not a function
at Parser.evaluateExpression (/Users/bo/Sites/testsite.test/wp-content/themes/sage/node_modules/webpack-cli/node_modules/webpack/lib/Parser.js:1987:14)
at parser.hooks.statementIf.tap.statement (/Users/bo/Sites/testsite.test/wp-content/themes/sage/node_modules/webpack-cli/node_modules/webpack/lib/ConstPlugin.js:122:28)

Anybody know ho to fix this?


#2

Hi again,
It seems that all I had to do was to upgrade my yarn version to v. 1.12.3:
brew upgrade yarn

Cheers :slight_smile: