相关疑难解决方法(0)

npm install eslint 缺少参数错误

我正在尝试在项目文件夹中本地安装 eslint。但是,如https://eslint.org 上所述进行安装

npm install eslint --save-dev
Run Code Online (Sandbox Code Playgroud)

返回以下错误:

npm ERR! Linux 4.15.0-70-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "eslint" "--save-dev"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror     at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror     at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror     at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror     at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror     at addRequestedAndFinish …
Run Code Online (Sandbox Code Playgroud)

node.js npm eslint npm-install

8
推荐指数
2
解决办法
4407
查看次数

标签 统计

eslint ×1

node.js ×1

npm ×1

npm-install ×1