在npm中不能将“ node_modules”识别为内部或外部命令吗?

时间:2019-07-23 05:07:56

标签: node.js npm

在Window 10 Pro的Node.js 12.2.0(x64)中,我创建并组织了文件和依赖项结构,例如this

然后我打开Node.js cmd并键入以下命令:

$ cd C:\Users\kiroh\Desktop\pro-mern-stack
$ node_modules/.bin/babel src --presets react --out-dir static

但是cmd告诉我一个错误:

'node_modules' is not recognized as an internal or external command, operable program or batch file.

该如何解决?我是Node.js的新手。

1 个答案:

答案 0 :(得分:0)

请检查安装是否正确完成。 如果是,请检查此链接: https://github.com/npm/npm/issues/13750