第 1 行:此:未找到命令

Joe*_*hew 2 command node.js npm reactjs npx

我有一个问题。每当我尝试在 Windows 11 系统上运行任何 npx 命令时,都会收到此错误

C:\Users\JOEL MATHEW\node_modules.bin/../node/bin/node: 第 1 行:此:未找到命令

我已经面对这个问题很长时间了,而且仍然困扰着我。

$ npx -v

9.5.0
 
$ npm -v

9.5.0

$ node -v

v18.14.2

$ npx create-react-app test

C:\Users\JOEL MATHEW\node_modules\.bin/../node/bin/node: line 1: This: command not found
Run Code Online (Sandbox Code Playgroud)

此图显示了运行 create-react-app 后在我的终端上打印的错误。

小智 25

我终于解决了我的问题。

每次运行以下命令时,我都会收到错误 $ eas build -p android --profile Preview $ eas build -p android

修复步骤: 导航至:C:\Users\USRN\AppData\Roaming\npm\node_modules\node\bin\

在我的文件中,我发现了两个节点文件,一个是 .exe,另一个只是文本文件

所以我删除了非可执行文件。

希望这对将来的人有帮助