Skip to content

[BUG] npm run dosent work in v8.1.3 #4020

@krush11

Description

@krush11

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I have set up npm autocomplete in my bashrc.
While trying to run npm scripts, I type npm run and hit tab for auto-completion options (list of all the scripts in my package.json), I don't get any options but get the list of my files and folders

Expected Behavior

On hitting tab, I should have got the 3-4 scrips I had setup in package.json

Steps To Reproduce

  1. This bug is only there in [email protected]. (I verified it for 8.1.1 and 8.1.2)
  2. Setup package.json with a few scripts (say start, build, deploy etc.)
  3. npm run (and hit tab to get autocomplete suggestions)
  4. You should see the list of files and folders inside the directory as suggestions instead of the script tags you setup

Environment

  • npm: 8.1.3
  • Node: 16.13.0
  • OS: Ubuntu 20.04
  • platform: Acer Swift 3
  • npm config:
; node bin location = /usr/bin/node
; cwd = /home/krush/augmatech/aurora
; HOME = /home/krush
; Run `npm config ls -l` to show all defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingPriority 2secondary priority issueRelease 8.xwork is associated with a specific npm 8 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions