下载项目:
https://github.com/SCYangChao/ck-common-flow.git
项目主要使用了elementUI 基础搭建的一个管理前台框架
安装运行
npm install
出现如下错误:
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.npmjs.eu/axios failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.eu. is not in the cert's altnames: DNS:npmjs.eu, DNS:www.npmjs.eu
根据异常为SSl验证没有通过,可以通过设置跳过TLS验证,运行如下命令
npm config set strict-ssl false
在运行 npm install ,又出现新的异常,信息如下:
npm install
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.eu/element-ui
npm ERR! 404
npm ERR! 404 'element-ui@2.7.2' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404 1. name can only contain URL-friendly characters
npm ERR! 404 It was specified as a dependency of 'CK-FLOW'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
在远程仓库中没有发现Element-ui@2.7.2,这个组件为404。把仓库地址设置为taobao安装Cnpm命令。
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
设置安装成功后,运行cnpm install,安装成功。信息如下: