Npm 系统找不到指定的路径,但随后显示结果

Npm 系统找不到指定的路径,但随后显示结果,npm,visual-studio-code,cmd,cucumber,gherkin,Npm,Visual Studio Code,Cmd,Cucumber,Gherkin,我正在学习vscode中的小黄瓜、黄瓜和npm 我得到了通常的“系统找不到指定的路径”错误消息,但是结果在下面显示为正常 C:\projects\vscode1>npm --version The system cannot find the path specified. 7.11.2 它也无法识别其中带有“.”的路径,因此“C:\projects\vscode1>/node\u modules/.bin/cumber js”显示了不同的错误 C:\projects\vscode1&g

我正在学习vscode中的小黄瓜、黄瓜和npm

我得到了通常的“系统找不到指定的路径”错误消息,但是结果在下面显示为正常

C:\projects\vscode1>npm --version
The system cannot find the path specified.
7.11.2
它也无法识别其中带有“.”的路径,因此“C:\projects\vscode1>/node\u modules/.bin/cumber js”显示了不同的错误

C:\projects\vscode1>./node_modules/.bin/cucumber-js
'.' is not recognized as an internal or external command,
operable program or batch file.
文件夹肯定以.bin的形式存在于节点_模块中

在npm安装过程中,额外组件的cmd(安装巧克力等)将无法完成,因此我不确定这是否相关。我已经对安装程序进行了修复,但没有解决问题

已更新

我可以在CMD中运行它,但没有这个.bin问题,但是没有输出。我尝试运行的代码是:

const { Given } = require("@cucumber/cucumber")

//const (Given) = require('cucumber')

Given('a user opens {string}', (url) => {
    console.log(url)
})
vscode.feature

Feature: vscode feature

    Feature Description

        Scenario: Scenario name
        Given a user opens "https://www.duckduckgo.com/"

        

本教程可在以下网址找到:

Try
\node\u modules\.bin\cumber js
很有效,谢谢JosefZ。这是由于windows vs Linux命令行造成的吗?顺便说一句,我仍然有“系统无法找到指定的路径”的问题