The following error showed in my metro bundler when I run react-native
with npm plugin @woocommerce/api
library. It's currently active plugin for woocommerce rest api.
I've searched many solutions about the stream
dealing with cipher-base
. It doesn't work. I've also deleted node_modules and reinstall again. And then, npm start -- --reset-cache
. Nothing Works for me. Please, help me out.
error: Error: Unable to resolve module stream from C:\**\node_modules\cipher-base\index.js: stream could not be found within the project.
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
1 | var Buffer = require('safe-buffer').Buffer
> 2 | var Transform = require('stream').Transform
| ^
3 | var StringDecoder = require('string_decoder').StringDecoder
4 | var inherits = require('inherits')