[英]npm install ERR code E404 or code ENOENT
my node version 8.9.1 ; 我的节点版本8.9.1;
npm version 5.5.1; npm版本5.5.1;
when i try to install modules by npm,the ERR reported like 'code E404' or 'code ENOENT'; 当我尝试通过npm安装模块时,错误报告为“代码E404”或“代码ENOENT”;
I try to install different modules ,such as 'tldr' for global or 'babel-plugin-import' for my project called 'dvaDemo' The dvaDemo is an antd project creating by dva-cli 我尝试安装其他模块,例如用于全局的“ tldr”或用于名为“ dvaDemo” 的项目的“ babel-plugin-import” 。dvaDemo是由dva-cli创建的antd项目。
npm i babel-plugin-import --save
npm i tldr -g
check your npm registry: 检查您的npm注册表:
npm get registry
it might be something else than " https://registry.npmjs.org/ ", if so either install specific package with ending --registry="https://registry.npmjs.org/"
for example 例如,它可能不是“ https://registry.npmjs.org/ ”,而是安装以--registry="https://registry.npmjs.org/"
结尾的特定软件包
git install babel-plugin-import --registry="https://registry.npmjs.org/"
or just run this: 或只是运行此:
npm set registry --registry="https://registry.npmjs.org/"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.