Cli: [BUG]在npm install上的EMISSINGARG

创建于 2019-12-13  ·  4评论  ·  资料来源: npm/cli

什么为什么

NPM安装错误

什么时候

  • 每次npm安装

哪里

  • 通过sudo apt install npm安装npm

怎么样

当前行为

  • 大错误

重现步骤

  • npm安装在默认的phoenix应用程序上

预期行为

  • 成功安装

WHO

  • 不适用

参考文献

  • 不适用
cohen@xps-13-7390:~/code/cookbook/assets$ npm install
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm WARN deprecated [email protected]: Package no longer supported. Contact [email protected] for more info.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Linux 4.15.0-1065-oem
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
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 (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror     at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror     at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/cohen/code/cookbook/assets/npm-debug.log

npm-debug.log的内容

最有用的评论

谢谢@marianelamin。 您的解决方案为我工作。

在我的Ubuntu实例上,我运行了以下2条命令:
#npm install -gn
#n稳定

所有4条评论

我有同样的问题

我们也在Phoenix应用程序中遇到了这个问题。 将资产中package.json webpack-cli从2.xx升级到3.xx为我们解决了这个问题。 我们正在使用

  • Ubuntu 18.04 LTS
  • 节点v8.10.0
  • npm v3.5.2
  • 凤凰1.4.10

使用Ubuntu 18.04 LTS和Node v8.10.0时,我遇到了同样的问题。

我升级了节点版本,并且_npm install_正常运行。

谢谢@marianelamin。 您的解决方案为我工作。

在我的Ubuntu实例上,我运行了以下2条命令:
#npm install -gn
#n稳定

此页面是否有帮助?
0 / 5 - 0 等级