根据Angular样式指南(John Papa或Todd Motto)的建议,jshint在定义角度模块(或指令或工厂)时会抛出错误.例如,对于像这样的控制器:
(function () {
'use strict';
angular
.module('myApp')
.controller('myAppCtrl', theController);
function theController() {...}
})();
Run Code Online (Sandbox Code Playgroud)
... jshint抛出此错误:
'theController' was used before it was defined.
Run Code Online (Sandbox Code Playgroud)
尽管存在这些错误,角度应用程序仍可正 但是我不知道为什么jshint抗议......
我错过了什么?我想知道jshint是否是角度代码质量的一个很好的评估者(尽管它包含在流行的包中作为生成器角度)或者我是我做错了(虽然我的应用程序工作).
提前致谢!
我正在尝试从ubuntu-1904Google Cloud 上运行的常规 VM 实例(即)上的私有 GCP 容器注册表中提取 docker 容器,但出现以下错误:
user@test ~ $ sudo docker pull example.io/docker-dev/name:v01
Error response from daemon: unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
Run Code Online (Sandbox Code Playgroud)
我按照这些说明进行操作,即运行该gcloud auth configure-docker命令,该命令会输出一条成功消息。
但是,docker pull再次运行该命令时,我得到完全相同的错误。
一些可能有助于提供反馈的额外测试:
docker run hello-world拉取并运行hello-world映像)docker pull example.io/docker-dev/name:v01在本地计算机(Mac)而不是 vm 实例上测试了相同的命令 ( ) 并且运行良好。virtual-machine docker google-cloud-platform google-container-registry docker-compose