Cannot find module 'asap/raw'

Running npm install in your project directory usually works.

(What it does is that it installs all the dependencies in the local node_modules folder that may have been downloaded when you installed that one package.)


Running npm install did not solve the problem for me.

I ran npm install -g asap to install asap and then the error went away.


The react-native init command creates a project which uses yarn by default since 0.57 (has yarn.lock). I had the same error when I installed a plugin by npm install, so the conclusion is that you can't use both package manager for the same project at the same time (yarn and npm). So:

  • Use yarn add instead of npm install.
  • Or if you don't want to use yarn, then "switch" to npm by running npm install first (after this you can delete yarn.lock and you must always use npm from this point instead of yarn).

Deleting node_modules and reinstalling didn't fix but doing npm install asap in the project directory fixed my issue.