提示如下警告错误
先删除composer.lock文件 命令rm -f composer.lock
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`. Your lock file does not contain a compatible
接下来报如下错误时,在composer.json 文件末尾加上
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
遇到token问题,输入提示的url即可找到token
只要粘贴上面的URL到浏览器中打开,然后生成一个token,然后复制这个新的token,在命令行中需要token的地方输入该token即可,该token会存储在用户家目录/.composer/auth.json中:
此后可以不用再输入token了,composer会自动去auth.json中找。
本人的目录是在这/Users/dragon/.composer/auth.json
安装成功
学习笔记,仅供参考!如有侵权,请联系删除!