-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn screws up dependency - Cannot find module './assets/empty-module.js' #2206
Comments
I encountered this issue as well. My hot fix is to touch an empty file for Updates: |
Thanks a lot!
Unfortunately |
I'm hitting the same error after I ran Reopen this issue? |
@fungilation I recommend not using the workaround (touch empty-module.js). See peteroid's update and my comment: You should take care about the |
The fix I find working is peteroid's update, not touching the file.
|
I ended up removing my .yarnclean file (which was way overgeneralized), removed node_modules, then ran |
|
Do you want to request a feature or report a bug?
BUG
What is the current behavior?
I have a working npm project.
When migrating to yarn (yarn to create a yarn.lock) it's broken.
If the current behavior is a bug, please provide the steps to reproduce.
rm -rf node_modules
(to omit side effects).npm install
, runningreact-native *
(let * be any react-native command) works fine.yarn
creates a yarn.lock as expected. But when runningreact-native *
it fails withError: Cannot find module './assets/empty-module.js'
1. HINT: I get the same when NOT using npm at all. So starting with a clean directory and yarn install.
2. HINT: I first got this issue when updating my dependency versions from an older version using yarn only!
3. HINT: I post this issue here as there is no problem when using npm (as of today). So I don't think it's a problem with react-native.
What is the expected behavior?
Running yarn does not screw up my dependencies.
Please mention your node.js, yarn and operating system version.
The bug is also reproducible with:
The text was updated successfully, but these errors were encountered: