我只是尝试在本地目录中运行npm install .,但一直出现这些错误:
npm ERR! install Couldn't read dependencies
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "."
npm ERR! node v4.4.6
npm ERR! npm v2.15.5
npm ERR! code EISDIR
npm ERR! errno -21
npm ERR! syscall read
npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.
我所做的就是进入我的目录,然后运行npm install . 我的目录里有一个packages.json文件。不知道为什么会出现这样的问题??? 编辑:packages.json文件内容如下:
{
"name": "speech-recognition",
"version": "1.0.0",
"description": "speech recognition app",
"main": "application.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "Lisa Buch",
"license": "ISC"
}
package.json
目录。能否分享一下它的内容?它应该是一个文件,而不是一个目录,所以我很好奇里面有什么。 - Akash