Skip to content

error for the command npx -c #62717

@haiw2sm

Description

@haiw2sm

Version

24.14.1

Platform

Microsoft Windows NT 10.0.22621.0 x64

Subsystem

No response

What steps will reproduce the bug?

  1. 在官网连接:https://nodejs.org/en/blog/release/v24.14.1下载[Window版本的msi格式安装包](https://nodejs.org/dist/v24.14.1/node-v24.14.1-x64.msi)
  2. 双击安装node-v24.14.1.msi后,重启终端(默认为powershell7)
  3. 输入命令npx -c "hello world", 出现弹窗错误
Image

How often does it reproduce? Is there a required condition?

目前在我的机器上,v22.11之后的版本好像都有这个问题,经测试vmware上的ubuntu22系统安装的node并没有这个问题。

可能的条件:在我的机器环境中我之前已经安装了nvm来管理node,但是在安装隔离node时,我使用了nvm off来关闭了nvm管理的node版本

What is the expected behavior? Why is that the expected behavior?

  1. npx -c is normal
  2. i hate the error alert window

What do you see instead?

the following argument was not expected: -c
Run with --help for more information

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions