Skip to content

Unable to resolve module string_decoder could not be found #295

Description

@NguyenHuynhHuuTai

BUNDLE ./index.js

error: Error: Unable to resolve module string_decoder from C:\ProjectName\node_modules\iconv-lite\encodings\internal.js: string_decoder could not be found within the project or in these directories: 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-*
    47 |
    48 | // We use node.js internal decoder. Its signature is the same as ours.

49 | var StringDecoder = require('string_decoder').StringDecoder;
| ^
50 |
51 | if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
52 | StringDecoder.prototype.end = function() {};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions