【问题标题】:npm install <package.name>npm install <package.name> 【发布时间】:2020-05-14 00:04:15 【问题描述】: I have to add package.json ,cors, body-parser in that directory. I tried to install them but they are not installing / appearing in my directed folder, please help me 【问题讨论】: 标签: javascript node.js json 【解决方案1】: 您尝试安装的目录不包含package.json 文件。这意味着该目录不是 NPM 项目。要启动它,请运行 npm init 并回答程序问您的问题。之后,您的安装命令应该可以正常工作了。 【讨论】: 非常感谢