react-native-render-html: Unable to resolve module `stream`

Is this a bug report or a feature request?

Bug reportt

Have you read the guidelines regarding bug report?

no

Have you read the documentation in its entirety?

yes

Have you made sure that your issue hasn’t already been reported/solved?

yes

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

I have only checked on Android

Is the bug reproductible in a production environment (not a debug one)?

debug doesn’t run

Have you been able to reproduce the bug in the provided example?

no

Environment

Environment: React: ^16.6.3 React native: ^0.59.2 react-native-render-html: ^4.1.2

Target Platform: Android (6.0) iOS (10.3)

Hi , I have updated react-native version to the latest. and I am trying to run:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

at first I got the error: ViewStylesPropTypes but I guess that got resolved when I updated to 4.1.2 And now I get this error:

error Unable to resolve module `stream` from `/Users/yasir/Projects/jobsaf/node_modules/htmlparser2/lib/WritableStream.js`: Module `stream` does not exist in the Haste module map

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (2 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, delete your node_modules folder and re-install it. You should be good to go.

if use “htmlparser2”: “^4.0.0”,Unable to resolve module stream must use “htmlparser2”: “^3.10.1”

Yes, i always do that,

the exactly error is:

error: Error: Unable to resolve module ./MultiplexHandler from node_modules/htmlparser2/lib/CollectingHandler.js:

None of these files exist:

  • node_modules/htmlparser2/lib/MultiplexHandler(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg)
  • node_modules/htmlparser2/lib/MultiplexHandler/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg) at ModuleResolver.resolveDependency (/Users/felansu/cloq/orion/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15) at ResolutionRequest.resolveDependency (/Users/felansu/cloq/orion/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18) at DependencyGraph.resolveDependency (/Users/felansu/cloq/orion/node_modules/metro/src/node-haste/DependencyGraph.js:287:16) at Object.resolve (/Users/felansu/cloq/orion/node_modules/metro/src/lib/transformHelpers.js:267:42) at /Users/felansu/cloq/orion/node_modules/metro/src/DeltaBundler/traverseDependencies.js:434:31 at Array.map (<anonymous>) at resolveDependencies (/Users/felansu/cloq/orion/node_modules/metro/src/DeltaBundler/traverseDependencies.js:431:18) at /Users/felansu/cloq/orion/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33 at Generator.next (<anonymous>) at asyncGeneratorStep (/Users/felansu/cloq/orion/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)

And yes, i always close metro, remove node_modules, run react reseting cache, etc…