Is it possible to install non-root dependencies in node_modules using NPM?

The repository @superflycss/component-navbox contains the following list of dependencies:

    "devDependencies": {
        "@superflycss/component-body": "^1.0.1",
        "@superflycss/component-display": "^1.0.2",
        "@superflycss/component-header": "^2.1.0",
        "@superflycss/component-test": "^3.6.14",
        "@superflycss/foundation": "^2.0.3",
        "@superflycss/superflycss": "^1.0.0",
        "@superflycss/utilities-colors": "^3.0.8",
        "@superflycss/utilities-effects": "^2.1.0",
        "@superflycss/utilities-fonts": "^3.3.7",
        "@superflycss/utilities-format": "^1.1.1",
        "@superflycss/utilities-layout": "^4.0.4",
        "lite-server": "^2.4.0",
        "npm-check-updates": "^2.15.0"
    },
    "dependencies": {
        "@superflycss/variables-dimension": "^2.0.0",
        "@superflycss/variables-layout": "^2.0.0"
    }

When executing the following commands:

git clone <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b1d6d8c5f1d6d8c5d9c4d39fd2dedc">[email protected]</a>:superflycss/component-navbox.git

cd component-navbox
npm i

It is expected that only the main dependencies will be present in the node_modules directory.

However, an additional dependency called variables-colors is also being included in the node_modules folder.

Is this behavior correct or is something missing?

One issue arising from this situation is that the version of variables-colors being installed is outdated. Since utilities-colors also relies on it, the older version takes precedence over the newer one, causing linting errors and other issues.

Answer №1

An inconsistency was found between the package-lock.json and package.json. To resolve this issue, I deleted the lock file along with the node_modules directory, then ran npm install to ensure all dependencies were correctly updated.

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

A pause of 5 seconds between every request in Node.js

Need Help with Delays in Node.js Request Queue I am facing an issue with my code that involves looping through more than 500,000 records in a database and requesting information from another server. I have managed to write all the necessary functions, but ...

Is it possible to set environment variables in Next.js outside of the pages directory?

Are there alternative methods for setting environment variables outside of a pages directory in NextJS? I have a utility function that defines the base API route in one centralized location. However, since this is a utility function and not associated with ...

Use Django, Ajax, and Jquery to incrementally add items to a "cart" by selecting checkboxes one by one

Despite adding new code, it's still not working as expected... I've been attempting to implement a feature where users can select items using checkboxes and add them to the "cart" displayed at the top of the page. Each item on the page has a che ...

Whenever I try to post a new order to my Firebase database, an error pops up saying "TypeError: Cannot read property 'numberOfSuits' of undefined."

When testing the code below on Postman, I encountered a typeerror (TypeError: Cannot read property 'numberOfSuits' of undefined). Additionally, when I removed the last three fields to only post the first two default fields, the data was successfu ...

Steps to insert a logo into a Bootstrap navbar

Hey there, I'm having trouble fitting my logo into a Bootstrap navbar. The issue is that the logo appears larger than the navbar itself, and I've tried various solutions without success. Can someone please assist me with this problem? Below is th ...

Is your href in javascript not functioning properly?

Recently, I completed the development of a mobile web application. Overall, everything seems to be working smoothly except for one issue: there is a link with JavaScript in its href that is causing problems. Strangely enough, this link works perfectly fi ...

No modifications to the CSS can be made within the "alterations" section of the Console drawer in Chrome

Is there a way to easily track and summarize all of my live CSS changes in the Chrome browser? I've searched on Stack Overflow, but haven't found a solution that works for me. This specific answer seems like it could be the most helpful for achie ...

How to use a self-hosted font in a custom Material-UI theme for ReactJS?

Currently, I am in the process of setting up my initial project utilizing Material-UI for ReactJS. My intention is to personalize the default theme by incorporating a custom font (from the server, not sourced from Google Fonts or anything similar). Despite ...

Ways to extract information from PayFast

One issue I'm facing with my online store is that although PayFast does call my notify_url, it appears that no data is being posted. Below are the codes I've been using: Code for purchasing: <button id="cCart" type="submit" class="bt ...

Tips on modifying the maxlength attributes for all "field answer" class elements

Looking for some help with adjusting the "maxlength" attribute in a class called "field answer." The current maxlength is set to 250, but I need it changed to 9999. Can someone guide me through this process? <div class="field answer"> &l ...

Converting CSS to SCSS using a for loop

I am currently learning SCSS and I have successfully converted the CSS code below to SCSS, but now I am struggling with completing the rest. I have tried looking for help online, but so far no luck. Can someone please assist me with this? .par-1 { wi ...

"Embracing AngularJs with the power of SocketIo

Can someone please help me with the code snippet provided below? This code is sourced from: http://www.html5rocks.com/en/tutorials/frameworks/angular-websockets app.factory('socket', function ($rootScope) { var socket = io.connect(); return { ...

Tips for automating file uploads in HTML

I am having trouble filling the <input type="file"> element programmatically when trying to upload a file using a form. Can someone please provide me with guidance on how to accomplish this task? The method does not matter, I just want to achieve m ...

What is the best location for storing css files in Laravel?

I've come to realize that I can easily make changes to the app.scss file in my Laravel projects and see those changes reflected by running npm run dev or npm run watch. However, I'm faced with a dilemma when dealing with multiple .css files. Whe ...

Guide on displaying the marker location on a map when hovering over a div element, similar to the method used by AirBnb

In the left side div of my page, there are items such as images, titles, details, and addresses. On the right side, I have a Leaflet Map that shows markers of these addresses taken from the left side items. What I want is to display the marker locations on ...

Unable to run the JSON.parse() function while using the 1.10.2 version of jquery.min.js

Has anyone else encountered a situation where using JSON.parse() to parse the PHP array return only works when applying 1.3.2/jquery.min.js and not 1.10.2/jquery.min.js? If so, what solution did you find? PHP array return $returnArray['vercode' ...

What could be causing the partial to not load JavaScript properly?

Hello, I am a newcomer to Angular and I'm currently working on implementing the slick carousel. It functions properly on the index page, but when I try to use the same HTML in a partial and include it with ng-view, it doesn't work as expected. T ...

Selecting tabs in Angular with a controller function

I'm currently working on implementing AngularJS to show the tab number when a specific tab is selected using the controller method. However, it's not working as expected. Any assistance on this issue would be greatly appreciated. HTML <body ...

In an AngularJS custom filter function, the error message "keys is not defined" is displayed

As I was reviewing examples in an Angular JS book, I came across a concept that has left me puzzled. It involves the use of custom filters with ng-repeat. Below are the code snippets: <a ng-click="selectCategory()" class="btn btn-block btn-default btn- ...

Error in docker build due to missing package.json file for a local npm dependency, but the application runs successfully using npm start

I am currently developing an npm module locally, which is a dependency in a client application. The directory structure looks like this: /app /client /src App.js package.json Dockerfile.dev /shared /contexts package.json ...