What is the reason behind the command "npm-install" placing files directly into the root directory?

After pulling my front-end project from the repository, I noticed that the node_modules folder was missing. My usual approach is to use npm install to get all the dependencies listed in the package.json file installed.

However, this time around, I ended up with extra files being installed directly in the root folder:

https://i.stack.imgur.com/Jijgi.png

Here is a link to my package.json file for reference:

https://i.stack.imgur.com/Z7PcR.png

When attempting to run the project using the ng serve command, I encountered the following error:

An unhandled exception occurred: ...\Projects\byuer_app_v2 contains both .browserslistrc and browserslist
See "...\Local\Temp\ng-DnzJEb\angular-errors.log" for further details.

Based on my observation, I suspect that the error may be related to these additional files installed in the root directory.

Therefore, my question is why are these files being installed there? And what steps can I take to prevent them from being installed?

Answer №1

These resources should provide some insight

Issues with .cmd files being created during npm install in Angular project root directory

Excessive files generated by 'npm install' in app's root directory

It seems like a potential problem with node setup or Windows configurations was mentioned in the discussions.

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

Avoid any loss by preventing npm from deleting files when errors occur

I am in urgent need of assistance. I have spent numerous days and nights trying to solve what seems to be a minor issue. My struggle lies in the installation of a large node package with multiple dependencies. Some of these dependencies fail due to issues ...

Incorporate matTooltip dynamically into text for targeted keywords

I'm currently tackling a challenge in my personal Angular project that utilizes Angular Material. I'm struggling to find a solution for the following issue: For instance, I have a lengthy text passage like this: When you take the Dodge action, ...

Saving selected language in Angular using ngx-translate

I am facing an issue with ngx-translate for translation. Whenever I select a language, it gets saved in localStorage. However, upon refreshing the page or navigating to another page, it reverts back to the default keys instead of the selected language. Be ...

How to reset an Angular 7 reactive form to its initial values instead of clearing them completely

Is there a way to restore a reactive form group back to its original values without completely clearing it using .reset()? In this StackBlitz example, the default selected value is Parent. If a user changes it to "sister" and wants to revert the form to i ...

Is there a way to access service data within an Angular interceptor?

I'm trying to include my authentication token in the request header within my auth.interceptor.ts. The value of the authentication token is stored in auth.service.ts. Below is the code for auth.interceptor.ts @Injectable() export class AuthIntercepto ...

Encountered an unhandled promise rejection: TypeError - The Form is undefined in Angular 6 error

Whenever I attempt to call one .ts file from another using .Form, I encounter the following error: Uncaught (in promise): TypeError: this.Form is undefined The file that contains the error has imported the .ts file which I intend to pass values to. ...

Implementing Angular's Advanced Filtering Across Multiple Data Fields

I am looking to create a custom filter for a list. Here is an example of the Array of Objects: myList: [ { "id": 1, "title":"title", "city":"city name", "types":[ { ...

Utilize npm to install from a GitHub pull request

After checking out the npm install documentation, it seems like it is doable to npm install from a github repository. Can we also npm install something specifically from a pull request? Could the solution be to install based on the latest commit (last sh ...

Angular - Display shows previous and current data values

My Angular application has a variable called modelResponse that gets updated with new values and prints them. However, in the HTML, it also displays all of its old values along with the new ones. I used two-way data binding on modelResponse in the HTML [( ...

Can you delve into the origin of the term Modal in the context of Angular and web development?

My understanding of a Modal is that it is a webpage component that opens separately from the main page in order to maintain continuity. Am I correct? I am curious as to why it is referred to as a Modal. Could it be short for modularity? Meaning that vari ...

Unable to assign to 'disabled' as it is not recognized as a valid attribute for 'app-button'

How to link the disabled property with my button component? I attempted to add 'disabled' to the HTML file where it should be recognized as an input in the button component (similar to how color and font color are recognized as inputs) ... but ...

Tips for resolving the 'node is not defined' error in the case of passing a default value

Attempting to incorporate the Trie data structure into JavaScript has presented a challenge. Within the print function, which displays an array of all words in the Trie, there is a search function that looks for words within the Trie and adds them to the a ...

Angular 2 Dropdown Multiselect Plugin - Fully Customize Width to 100%

Currently working on integrating the angular-2-dropdown-multiselect component: https://www.npmjs.com/package/angular-2-dropdown-multiselect The component functions correctly, but I am looking to adjust its width to fit the container... I believe simply ...

In Angular 5 HTTP GET request, the value "null" is being converted to ""null""

I'm currently in the process of transitioning our application from Angular 4 to Angular 5. In Angular 5, when passing an object model as parameters, if one of the values is null, it gets converted to a "null" string which is causing issues for us. Her ...

Angular 8 combined with Mmenu light JS

Looking for guidance on integrating the Mmenu light JS plugin into an Angular 8 project. Wondering where to incorporate the 'mmenu-light.js' code. Any insights or advice would be greatly appreciated. Thank you! ...

How can I fetch only the data for the current month in Sequelize using Node

Is there a way to filter data for the current month only using this query? app.get("/api/timesheet_employerId", function (req, res) { console.log("I am the employerId", req.user.id) db.TimeSheet.findAll({ include: [ ...

Steps for running an Angular application in IntelliJ:1. Open IntelliJ IDEA

I'm currently navigating through IntelliJ to set up Angular support. https://www.jetbrains.com/help/idea/2017.1/using-angular.html#install_angular_cli After successfully creating the project, I am unsure of how to run it. My guess is that I need to ...

What is the best way to trigger a function on the fly within my loop?

As a newcomer to Ionic and hybrid app development, I'm struggling with how to phrase my question. Essentially, I need help with opening an ion-select field by clicking on another button in my app. Although the functionality somewhat works, it doesn&a ...

Tips for deploying an Angular Universal 9 application on a live server

Our Angular 9 app functions perfectly when deployed on an IIS server. We also have a version of the app that has been integrated with Universal by another company. Now, we need to figure out how to deploy our app with server-side rendering into productio ...

Generating multiple output files using npm scripts

Experimenting with npm scripts instead of gulp has brought me to a hurdle. Should I create one npm script to compile scss files using node-sass for both development and production, or should I have separate scripts for each purpose? Below is my package.js ...