# Yarn install throwing errors

**URL:** <https://discourse.roots.io/t/yarn-install-throwing-errors/12516>\
**Category:** sage\
**Created:** [May 21, 2018, 9:09pm UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516 "2018-05-21T21:09:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wbiggs](https://discourse.roots.io/user_avatar/discourse.roots.io/wbiggs/32/4789_2.png) [@wbiggs](https://discourse.roots.io/u/wbiggs)\
**Post date:** [May 21, 2018, 9:09pm UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516/1 "2018-05-21T21:09:47Z")

</div>

Hi all. I’m getting an error when trying to set up Sage, and it’s preventing me using Sage at all.

```
yarn install v1.0.1
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning uws@9.14.0: stop using this version
warning gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[3/5] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "ajv-keywords@3.2.0" has incorrect peer dependency "ajv@^6.0.0".
warning "ajv-keywords@2.1.1" has incorrect peer dependency "ajv@^5.0.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss@>=5.0.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss-less@>=1.1.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss-sass@>=0.2.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss-scss@>=1.0.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "sugarss@>=1.0.0".
error An unexpected error occurred: "ENOENT: no such file or directory, open '/mnt/d/Development/cameron-klales/app/public/wp-content/themes/klales/node_modules/has-symbols/.npmignore'".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/d/Development/cameron-klales/app/public/wp-content/themes/klales/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

```

Does anyone know what’s happening? Every time I delete node-modules and try again, it fails looking for a different file - this time it just happened to be this .npmignore. The file _is_ actually missing.

Deleting the entire theme directory and re-installing sage via `composer create-project roots/sage klales` still causes this error to occur when running `yarn`.

Thank you.

---

<div class="post-metadata">

**Author:** ![wbiggs](https://discourse.roots.io/user_avatar/discourse.roots.io/wbiggs/32/4789_2.png) [@wbiggs](https://discourse.roots.io/u/wbiggs)\
**Post date:** [May 21, 2018, 9:27pm UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516/2 "2018-05-21T21:27:29Z")

</div>

Proof this happens with a different file each time:

```
yarn install v1.0.1
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
warning uws@9.14.0: stop using this version
warning gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
[3/5] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "ajv-keywords@3.2.0" has incorrect peer dependency "ajv@^6.0.0".
warning "ajv-keywords@2.1.1" has incorrect peer dependency "ajv@^5.0.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss@>=5.0.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss-less@>=1.1.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss-sass@>=0.2.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "postcss-scss@>=1.0.0".
warning "postcss-html@0.12.0" has incorrect peer dependency "sugarss@>=1.0.0".
warning "stylelint-webpack-plugin@0.10.5" has incorrect peer dependency "webpack@^1.13.2 || ^2.7.0 || ^3.11.0 || ^4.4.0".
error An unexpected error occurred: "ENOENT: no such file or directory, open '/mnt/d/Development/cameron-klales/app/public/wp-content/themes/klales/node_modules/yauzl/README.md'".
info If you think this is a bug, please open a bug report with the information provided in "/mnt/d/Development/cameron-klales/app/public/wp-content/themes/klales/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
```

---

<div class="post-metadata">

**Author:** ![ben](https://discourse.roots.io/user_avatar/discourse.roots.io/ben/32/11377_2.png) [@ben](https://discourse.roots.io/u/ben)\
**Post date:** [May 22, 2018, 12:46am UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516/3 "2018-05-22T00:46:35Z")

</div>

Have you met all the minimum requirements for installing Sage?

Looks like you might have an outdated PHP and/or Node version

---

<div class="post-metadata">

**Author:** ![wbiggs](https://discourse.roots.io/user_avatar/discourse.roots.io/wbiggs/32/4789_2.png) [@wbiggs](https://discourse.roots.io/u/wbiggs)\
**Post date:** [May 22, 2018, 1:31am UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516/4 "2018-05-22T01:31:21Z")

</div>

I have `PHP 7.2.5-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 5 2018 04:59:13) ( NTS )` and node.js `v9.8.0`.

Your question did remind me to update Yarn from 1.0.1 to 1.6.0, though, and the error seems to be gone now. So I guess that was it? It’s my own fault for not updating it since September, lol, but it might be good to add the minimum version of Yarn to the requirements. Not sure what that is though.

---

<div class="post-metadata">

**Author:** ![btamm](https://discourse.roots.io/user_avatar/discourse.roots.io/btamm/32/6786_2.png) [@btamm](https://discourse.roots.io/u/btamm)\
**Post date:** [February 5, 2019, 3:48pm UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516/5 "2019-02-05T15:48:36Z")

</div>

I have a fresh installation of Wordpress, Bedrock and Sage with a node container for development:  
Node v11.9.0  
Yarn v1.13.0

When trying to use Sage’s documented Yarn commands, I receive dependency errors:

develop@3ae0d923d729:/var/www/html/site/web/app/themes/site# npm install --allow-root && yarn install --allow-root && yarn && yarn start  
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.  
npm WARN stylelint-webpack-plugin@0.10.5 requires a peer of webpack@^1.13.2 || ^2.7.0 || ^3.11.0 || ^4.4.0 but none is installed. You must install peer dependencies yourself.  
npm ERR! Cannot read property ‘0’ of undefined  
npm ERR! A complete log of this run can be found in:  
npm ERR! /root/.npm/\_logs/2019-02-05T15\_22\_44\_839Z-debug.log  
develop@3ae0d923d729:/var/www/html/site/web/app/themes/site# node -v  
v11.9.0  
develop@3ae0d923d729:/var/www/html/site/web/app/themes/site# yarn -v  
1.13.0

Any ideas?

---

<div class="post-metadata">

**Author:** ![MWDelaney](https://discourse.roots.io/user_avatar/discourse.roots.io/mwdelaney/32/5755_2.png) [@MWDelaney](https://discourse.roots.io/u/MWDelaney)\
**Post date:** [February 5, 2019, 8:30pm UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516/6 "2019-02-05T20:30:00Z")

</div>

`npm install --allow-root &amp;&amp; yarn install --allow-root &amp;&amp; yarn &amp;&amp; yarn start`

These aren’t Sage’s documented `yarn` commands. Or at least I haven’t seen these in the docs. Can you point to the docs page where this command is specified?

---

<div class="post-metadata">

**Author:** ![btamm](https://discourse.roots.io/user_avatar/discourse.roots.io/btamm/32/6786_2.png) [@btamm](https://discourse.roots.io/u/btamm)\
**Post date:** [February 6, 2019, 2:12am UTC](https://discourse.roots.io/t/yarn-install-throwing-errors/12516/7 "2019-02-06T02:12:53Z")

</div>

My apologies for the confusion - I am not quite sure what I was doing 🙂 I did end up resolving the issue by using a different environment.
