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.

Throws error after 'import mongodb'

See original GitHub issue

The whole application throws an error after import 'mongodb'

App.js file import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import 'bulma/css/bulma.css'; import 'mongodb'; .....

Error message outputs client:47 ./~/resolve-from/index.js Module not found: Error: Cannot resolve module 'module' in W:\FAdeniyi\My Documents\sublime\ipay\node_modules\resolve-from resolve module module in W:\FAdeniyi\My Documents\sublime\ipay\node_modules\resolve-from looking for modules in W:\FAdeniyi\My Documents\sublime\ipay\node_modules W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module doesn't exist (module as directory) resolve 'file' module in W:\FAdeniyi\My Documents\sublime\ipay\node_modules resolve file W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module doesn't exist W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module.js doesn't exist W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module.json doesn't exist [W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module] [W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module] [W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module.js] [W:\FAdeniyi\My Documents\sublime\ipay\node_modules\module.json] @ ./~/resolve-from/index.js 3:13-30

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
lilsescommented, Aug 4, 2016

No worries. Its React Routers

1reaction
gaearoncommented, Aug 4, 2016

Yep. Then you would use something like fetch() to talk from the frontend React app to your Node (or whatever) backend app.

Check out this tutorial: https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/

I hope this helps! It doesn’t use a real database, but you can take that example Node app and add Mongo to it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting an error when trying to import a JSON file ...
I am on Windows 10. I recently obtained a large JSON file (200 MB) via webscraping, and I am now trying to import...
Read more >
MongoDb throws an error while importing using mongoImport
RESOLVED! I was in the mongo enterprise, typed exit, got out of enterprise and then typed the import command and it worked!
Read more >
error while importing data from json file into mongodb
to mongodb-user. Whenever i try to import data from json file in mongodb its throwing me an error. I have attached the file...
Read more >
When trying to import mongoclient in my react project ...
Hi, var MongoClient = require('mongodb').MongoClient. When i try to import MongoClient below error is thrown, i have installed all required ...
Read more >
mongoimport: 3 Simple Steps to Import Data to MongoDB ...
All users are required to have MongoDB database tools installed on their system before using the mongoimport command. If you are a new...
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