Skip to content

Error: Unable to resolve module 'stream' #33981

Closed
@t104360088

Description

@t104360088

Description

The project was working fine a while ago, but suddenly it can't be executed, can anyone help me?
I have tried any clear command and action.

error: Error: Unable to resolve module stream from D:.........\node_modules\readable-stream\readable.js: stream could not be found within the project or in these directories:
node_modules\readable-stream\node_modules
node_modules

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 | exports = module.exports = require('./lib/_stream_readable.js');
| ^
2 | exports.Stream = require('stream');
3 | exports.Readable = exports;
4 | exports.Writable = require('./lib/_stream_writable.js');

Version

0.64

Output of npx react-native info

System:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
Memory: 16.13 GB / 31.96 GB
Binaries:
Node: 16.15.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.10.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-212.5712.43.2112.8512546
Visual Studio: Not Found
Languages:
Java: 11.0.15
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.1 => 0.64.1
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

Run the code

Snack, code example, screenshot, or link to a repository

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: AnsweredWhen the issue is resolved with a simple answer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions