question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module 'querystring' when using in React-Native app

See original GitHub issue

Hello,

I am trying to use this module in react-native app but I am getting following error:

error: bundling failed: Error: Unable to resolve module `querystring` from `/Users/zymfilip/Development/src/NBABrowseApp/node_modules/nba/src/stats.js`: Module does not exist in the module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
  1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.  4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.

I tried proposed solution but it does not work. Here’s my env setup:

node v6.13.1
npm v3.10.10
nba v4.2.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

13reactions
MatthewDevelopcommented, Dec 5, 2018

just use npm install querystring it works for me

4reactions
ajaymarathecommented, Jan 29, 2021

just use npm install querystring it works for me

Works for me too 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting the error "Module not found: Error: Can't resolve ...
in your webpack.config.js configuration file update or add the resolve entry to look like this resolve: { fallback: { "querystring": ...
Read more >
query-string - npm
Start using query-string in your project by running `npm i query-string`. ... with Object.create(null) and thus does not have a prototype .
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
In my case, I got it like this "Module not found: Error: Can't resolve 'react-icons/fa' in 'C:\Users\user\Desktop\Projects\Address Locator\ ...
Read more >
Test Renderer - React
Create a TestRenderer instance with the passed React element. It doesn't use the real DOM, but it still fully renders the component tree...
Read more >
Query string | Node.js v19.3.0 Documentation
The node:querystring module provides utilities for parsing and formatting URL query strings. It can be accessed using: const querystring = require('node: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found