Encountering a problem trying to install the mongodb module for nodejs

I am currently running node version 0.10.28

Whenever I try to run node-gyp install, it gets stuck and I can't proceed with anything else.

I'm trying to install the mongodb driver for node.js (npm install mongodb). However, it's asking me to first build node-gyp before proceeding further.

I feel completely stuck!

Below are the commands that I have tried:

C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin>npm install mongodb
npm WARN package.json <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ea8d839e829f88c79f9886c78c988587c78d839eaadbc4dbc4db">[email protected]</a> No repository field.
npm http GET https://registry.npmjs.org/mongodb
npm http 304 https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/bson
npm http GET https://registry.npmjs.org/kerberos
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/kerberos
npm http 304 https://registry.npmjs.org/bson
npm http GET https://registry.npmjs.org/core-util-is
npm http GET https://registry.npmjs.org/isarray
npm http GET https://registry.npmjs.org/string_decoder

> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8ee5ebfcecebfce1fdcebea0bea0bd">[email protected]</a> install C:\Program Files\nodejs\node_modules\npm\node_modules\m
ongodb\node_modules\kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)


C:\Program Files\nodejs\node_modules\npm\node_modules\mongodb\node_modules\kerbe
ros>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_
modules\node-gyp\bin\node-gyp.js" rebuild

But after this point, everything freezes.

Answer №1

For detailed guidance on installing and utilizing MongoDB with Node.js, refer to the documentation provided at (https://www.npmjs.org/package/mongodb). It is recommended to have a 64-bit operating system for optimal performance when working with MongoDB. Additionally, consider using npm with registry setting enabled for a smoother installation process via command line.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Getting Started with NPM Package Initialization in Vue

I'm attempting to incorporate the v-mask package into my Vue project using npm. Following the documentation, I executed npm install v-mask, but I am unsure where exactly to initialize the code. I tried placing it in the main.js file: import { createAp ...

The system was unable to locate node.js with socket.io

I'm having trouble locating the file. According to the documentation I reviewed, socket.io is supposed to be automatically exposed. Encountered Error: polling-xhr.js?bd56:264 GET http://localhost:8081/socket.io/?EIO=3&transport=polling&t=LyY ...

A guide on renewing authentication tokens in the Nestjs framework

import { ExtractJwt, Strategy } from 'passport-jwt'; import { AuthService } from './auth.service'; import { PassportStrategy } from '@nestjs/passport'; import { Injectable, UnauthorizedException } from '@nestjs/common&apo ...

The first time I tried using React-app, I encountered an error that read "[email protected] postinstall"

I've been struggling to set up create-react-app, encountering the same issue repeatedly. I tried uninstalling and reinstalling node.js, but only the package.json and my-app folder were created. No src or other required folders were generated. Termina ...

Unacceptable POST Request Inputs

I'm encountering an issue with invalid inputs while making a signup POST request in Postman. I have reviewed my User Model attributes but I am unable to identify which input(s) are causing the error. Below you will find details of my model, controller ...

Leveraging generics within TypeScript

I have developed a class in TypeScript that uses generics. export class ModelTransformer { static hostelTransformer: HostelTransformer; static fromAtoB(instance: T): U { if (instance instanceof HostelType) { return ModelTrans ...

Issue with Angular HTTP API get request not reaching intended Express server function

I am facing an issue with my Angular application where I need to retrieve data from a MongoDB collection. The problem arises when I make two HTTP API calls ("query" and "get") from flConstruct to fetch data from the server. The "query" call works perfectly ...

The error occurred in async JavaScript parallel code because the task is not recognized as a function

I am attempting to upload an image and update the image URL in the database collection using the code provided below. Controller.prototype.handle = function (req, res, next) { var id = req.params.id, controller = req.params.controller, optio ...

Creating a personalized to-do list feature in NodeJs for exclusive user access: A step-by-step guide

After pondering over this issue for the past few days, I am still trying to grasp it. My web app allows users to login and create a list of students. My goal is to ensure that only the user who created the list can view it. Below is my progress so far. Co ...

Is it feasible to utilize Google Calendar API for JavaScript through npm install? Alternatively, can the Google Calendar API be utilized for Node.js in the browser within Next.js?

Looking to integrate the Google Calendar API as a library in your Next.js project without using _document.tsx? I have explored two potential approaches for achieving this: Utilize the google calendar api for JavaScript by installing it via npm Use the goo ...

Issue with establishing Socket.io connection between client and server side (React/Node.js) has been encountered

My goal is to establish a basic socket connection. The server setup is as follows: const express = require("express"); const app = express(); const port = 4000; const server = require("http").createServer(app); let io = require("sock ...

Encountering an error while setting up a Vue app in WebStorm on a Mac. npm is throwing

I'm currently in the process of setting up a Vue App using WebStorm on my Mac. However, when I try to run the npm run dev command, I encounter the following error: npm ERR! missing script: dev Below is a snippet from my package.json file: "versio ...

Error E11000: Key duplication detected in MongoDB database

I am facing an issue with my model as it keeps having errors after the first POST request. The project involves creating a scheduling application that spans over X number of days, each day having rooms and time slots for those rooms. The problem I am enco ...

Visual Studio Code encounters a JavaScript NPM error that is causing unexpected issues

When using Visual Studio Code, I want my JavaScript program to automatically run through a server as I am learning online. I followed the steps from a tutorial on setting up my IDE and installed Git and Node. Now, when I open Visual Studio and save my Hel ...

NodeJS QR code scanning with RaspberryPi camera

I'm working on a project to develop a nodeJS application that can scan QR codes using the Raspberry Pi3 board. I've been able to successfully implement this functionality with a USB camera using the Instascan node module. However, when attempting ...

What is the reason behind the limitations in the C++ node API for Electron that prevent the initialization of array buffers with external data?

Recently, I was working on developing a NodeJs module for electron using C++ and the Node addon C++ API. My goal was to create an ArrayBuffer object that would contain the data of an image I had read using C++ iostream functions like ifstream::read(). To ...

Optimal Usage of Express and Socket.io

I am currently working on a project using the Express framework, incorporating the socket.io package and NodeJS for server-side functionality, along with the socket.io-client on the client-side. Below is an example of the code snippet: var app = re ...

Mongoose is unable to update arrays, so it will simply create a new array

Having trouble updating my collection without any errors. Can someone lend a hand? I've been at this for 3 hours now. const product_id = req.body.cartItems.product_id; const item = cart.cartItems.find(c => c.product_id == product_id); i ...

Node.js: The error "req.session.save is not a function" occurred while trying to authenticate

I am currently facing an issue with PassportJS while trying to authenticate users in my application. Once a user logs in, the session is created, but upon redirection, the session seems to become undefined again as it has not been saved properly. I read on ...

Interacting with a PostgreSQL database using the node-postgres library

Is it necessary to use pg.connect() every time I want to query the database? Upon reviewing the GitHub page and wiki, I noticed that the examples demonstrate a query within the pg.connect callback function as shown below: // This code initializes a connec ...