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

    Javascript /

    Difference between PHP and JavaScript?

    npm doctor command

    Javascript /

    npm doctor command

    JavaScript Frameworks

    Javascript /

    Popular JavaScript Frameworks

    JavaScript Features

    Javascript /

    Features of JavaScript

    install selenium-webdriver package

    Javascript /

    Install selenium-webdriver package

    ‹ Popular JavaScript Frameworks› npm doctor command

    Recent Posts

    • ChatGPT Plans Free and PlusChatGPT Subscription Plans
    • Stellar Converter for Database ToolStellar Converter for Database
    • Stellar MySQL Log AnalyzerStellar Log Analyzer for MySQL
    • Stellar Repair for MySQLStellar Repair for MySQL
    • ChatGPT IntroductionChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI FeaturesChatGPT4 Conversational AI Features
    • Trends in Software EngineeringShaping the Future of Development: Exploring Key Trends in Software Engineering
    • Java PerformanceImproving Java Performance with Multithreading
    • QDrant Vector DatabaseOpen-source Vector Databases
    • Difference between PHP and JavaScript?
    • Bing AI Browser Web ContentBing Conversation Styles
    • ChatGPT PreviewChatGPT Introduction
    • Open Source AI Frameworks TensorFlowOpen Source AI Frameworks
    • Artificial Intelligence Tools

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com