What is the reason for using an outdated version of lodash in the code?

After successfully installing node on my Android phone using Termux, I decided to upgrade lodash globally to version 4.

$ npm -v
5.6.0

$ node -v
v8.9.2

$ npm i -g lodash
+ <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1975767d786a71592d37282e372d">[email protected]</a>

$ head -1 $NODE_PATH/lodash/README.md
# lodash v4.17.4 

Despite the upgrade, when I try to require it in node, it tells me I have version 3.

$ node 
> require('lodash')
  ...
  VERSION: '3.10.1'

What's odd is that I can't find a node_modules folder where I did the require operation. Can anyone explain why this is happening and suggest a solution? Thanks!

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

Unable to upload multiple files using formidable in Node.js

app.post('/upload', function (req, res) { var form = new formidable.IncomingForm(); form.parse(req, function (err, fields, files) { try{ if (files.file.name != '') { file_newname = dt.MD5(files.file.name ...

acquire the JWToken using Cypress and establish it as the header for subsequent requests

While attempting to test an Express web application I developed, the first step is authentication to retrieve a JWT token. The token retrieval process works fine, but when trying to set the header for subsequent requests, it doesn't seem to work. Thi ...

What is the process for setting up the configuration to retrieve npm packages from Jfrog artifacts for a YAML-based Azure CI Pipeline?

I am looking to set up an Azure DevOps yaml CI pipeline for a front-end angular app, specifically needing to retrieve all npm packages from Jfrog Artifacts in a defined way. Could someone kindly assist me with how to specify endpoints for pulling Jfrog np ...

Navigating with Express JS

Created a Page using Ionic 4 based on Angular, incorporating Angular routing with guards for access management. The data is retrieved from an APIRest built with Express JS. After publishing the site online, encountered an issue where certain routes in Io ...

Organize the array by property name and include a tally for each group

My current data structure looks like this: var data = [ { MainHeader: Header1, SubHeader: 'one'}, { MainHeader: Header1, SubHeader: 'two'}, { MainHeader: Header2, SubHeader: 'three'}, { MainHeader: Header2, SubHea ...

"Implementing U2F Authentication in NextJS: A Step-by-Step

Currently, I am looking to integrate U2F into my NextJS project using the beta version of NextJS 13. The server-side code is already functional with the u2f library, but I'm unsure how to implement it on the client side. const U2F = require("u2f ...

Guide on resolving ENOENT Error during React installation in Windows Subsystem for Linux

Currently, I am delving into the world of React app development using WSL (Windows Subsystem for Linux). As a newcomer to this technology, I have been working on creating an app located in my D drive (/mnt/d). Node has been successfully installed via NVM a ...

Error: The node user directory does not exist, please check your command input

After foolishly running this script in an attempt to avoid using sudo for npm -g commands, my node_modules directory has now moved to: /Users/myusername/.npm-packages/lib/node_modules Now when trying to run commands like yo or bower, I encounter the error ...

Issues with the w3c validator are preventing proper validation due to an unsuccessful SSL connection attempt

Everything seems to be running smoothly on my website when viewed in the browser. However, when I try to validate it using the W3C validator, I keep encountering an error message. https://i.stack.imgur.com/IGOA0.png Before reaching out here for help, I s ...

The implementation of Symbol.species in the Node.js Buffer class to generate a RapidBuffer seems illogical and confusing

While exploring the source code of ws, a popular WebSocket implementation for Node.js, I stumbled upon this specific piece of code: const FastBuffer = Buffer[Symbol.species]; But what exactly is this FastBuffer used for? Surprisingly, it seems that they a ...

Taking your Node.js application from your local machine to the worldwide web

Just dipping my toes into the world of web development and could use some guidance through this process. I currently have a node app running. http://localhost:8080/api/allinfo?unit_number=&street_number=&street_name=kent&street_type=st&sub ...

What are the best practices for implementing serialization in NestJS?

Recently, I delved into a fresh NestJs project and encountered a hurdle while trying to integrate serialization. The goal was to transform objects before sending them in a network response. Initially, everything seemed to be working smoothly until I attemp ...

Exploring Nested Data in MERN Stack Frontend Development

Here is the structure of my model: coverPhoto: { type: String, required: true, }, images: [{ type: String }], location: { address: { type: String, required: true }, city: { type: String, required: true }, postalCode: { type: Number, required: ...

Top method for transitioning project from Vue2 to Vue3

I am looking to take my project to the next level with vue3 This project is based on symfony and utilizes vue as separate components on the frontend Since I have never tackled a major upgrade before, I'm unsure of the best approach. Any suggestions? ...

Only the main page is accessible quickly through Express

Currently, I am delving into learning Express and leveraging FS to load my HTML Page. My research on this topic only led me to references of using ASP.NET instead of Express. Here is a snippet from my Server.js file: var express = require('express&a ...

Change to the parent frame using webdriver

I am facing an issue while trying to switch to the parent frame or iFrame using webdriver.js. Although I have implemented a function that works, it only goes up to the second level of frames. When attempting to switch to the parent frame from a deeper fr ...

Setting up Cypress's Electron browser for managing downloads

Is it possible to modify the Electron browser's configuration from within Cypress, in order to fix issues like download prompts not being detected? There is an issue with Cypress where it cannot detect download prompts, but there seems to be a potent ...

Executing a Knex RAW MySQL query to insert new records into a database table

As someone new to working with MySQL, I have previously used PSQL in a similar manner. However, the following code is generating an error. return await db .raw( `INSERT INTO users(firstName, lastName, email, ...

Is compiling inline sass possible with npm?

Looking for a simple method to achieve this task? I've experimented with sass, node-sass, and tinysass without success. My goal is to compile inline sass in JavaScript, much like the code snippet below: import sassPkg from 'sass-pkg' const ...

Encountered issue: EACCES error while attempting to open the file '/build/bundle.js' during webpack compilation

Encountering issues with running webpack from a subdirectory within my project. Here is the error message that is being displayed: Error: EACCES, open '/build/bundle.js' Below is the content of the webpack configuration file: module.exports = { ...