Skip to content

Conversation

MrMYHuang
Copy link

@MrMYHuang MrMYHuang commented Dec 28, 2017

While I am debugging JS codes (by Visual Studio Code 1.19.1) of my React Native Windows app through RN packager, I get this error message:
iconv-lite
This is my package.json.

  "dependencies": {
    "axios": "^0.17.1",
    "babel-core": "^7.0.0-beta.3",
    "buffer": "^5.0.8",
    "cheerio-without-node-native": "^0.20.2",
    "iconv-lite": "^0.4.19",
    "react": "16.0.0",
    "react-native": "~0.51.0",
    "react-native-code-push": "^5.2.1",
    "react-native-windows": "^0.51.0-rc.0",
    "react-navigation": "^1.0.0-beta.22",
    "react-redux": "^5.0.6",
    "react-test-renderer": "16.2.0",
    "redux": "^3.7.2",
    "redux-logger": "^3.0.6",
    "redux-promise-middleware": "^5.0.0",
    "redux-thunk": "^2.2.0",
    "stream": "^0.0.2"
  },

I guess the React Native environment needs not the extension for Node at the 132-th line in node_modules/iconv-lite/lib/index.js. Thus, I use the variable, navigator, to exclude the React Native environment...
Now, I can correctly launch my React Native apps in debugging mode.

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too old. In the newer versions of this package, does this error still happen to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants