Yarn Will Not Install Dependencies

Do you want to request a feature or report a bug?

Report a bug

What is the current behavior?
I cannot install dependencies for my project.

19:38:06: Warning: 'expo' dependency is not installed.
19:38:06: Warning: 'react' dependency is not installed.
19:38:06: Warning: 'react-native' dependency is not installed.
19:38:06:
19:38:06: If there is an issue running your project, please run `npm install` in C:\Users\betti\Desktop\auth and restart.

If the current behavior is a bug, please provide the steps to reproduce.

I am not sure what exactly can reproduce this bug. Here’s what I have done.

Deleted node_modules and re-installed them

  1. Delete node_modules
  2. yarn install
  3. yarn run android // (react native)

Note: It broke promptly after this

Deleted node_modules and yarn lock file and re-installed node modules

  1. Delete node_modules
  2. Delete yarn.lock
  3. yarn install
  4. yarn run android // (react native)

Then, I tried to install the dependencies individually.

  1. yarn add react
  2. yarn add react-native
  3. yarn add expo
  4. yarn run android // (react native)

Yarn Check

info fsevents@1.1.3: The platform "win32" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
success Folder in sync.
Done in 5.14s.

Yarn install

yarn install v1.5.1
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.91s.

What is the expected behavior?
Yarn installs the dependencies and my program works.

Please mention your node.js, yarn and operating system version.
Yarn version:
1.5.1

Node version:
8.9.2

OS Version:

Windows 10 Version 1709 (OS Build 16299.309)

Author: Fantashit

1 thought on “Yarn Will Not Install Dependencies

  1. How do you “delete” node_modules? I notice that when I do rm -rf node_modules/*, there are some lingering items: .bin & .yarn-integrity.

    If I do yarn install, my dependencies are NOT installed. However, if I completely remove everything from node_modules with rm -rf node_modules (or manually), and do yarn install everything is installed correctly.

    I’m not sure if this is expected behavior & really it seems like an environment issue since the two lingering items I mentioned above should be removed with rm -rf node_modules/* which makes me think there is a lock on them from some other process.

    Not sure if my issue is related, but thought I’d share my experience.

    Yarn version:
    1.3.2

    Node version:
    8.9.4

    OS Version:
    Windows 10

Comments are closed.