TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Javascript

Fix npm warnings config global `–global`, `–local` are deprecated.

Overview

In this post, we will learn how to fix the following npm warnings config global `–global`, `–local` are deprecated.
To install a package, we use the npm command. The warning message says that the flags are now deprecated.

Warning message

npm WARN config global `–global`, `–local` are deprecated. Use `–location=global` instead.
npm <command>

npm config global warning

Fix

Steps to fix to remove the warning message are as follows:

Open File Explorer and browse to the Node.js install location.

By default, it’s under the directory:

C:\Program Files\nodejs

 

Node Install Directory NPM File

Open the npm.cmd bat file in a text editor of your choice. You need to have Administrative privileges on the machine to edit this file.

Replace the -g flag with the following:

–location=global

npm cmd node.js flag

 

Save the file. Run the npm command. This will resolve the warning message.

 

npm warning message fix

That’s it. This would fix the warning message.

 

 

Related Posts

npm doctor command

Javascript /

npm doctor command

Javascript /

Popular JavaScript Frameworks

install selenium-webdriver package

Javascript /

Install selenium-webdriver package

Install Protractor

Javascript /

Install Protractor on Windows

npm version command

Javascript /

npm – Node Package Manager

‹ Popular JavaScript Frameworks› npm doctor command

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version