Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash during debugging React Native apps. #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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.

1 participant