在Google Cloud Platform Bookshelf教程中遇到以下错误:
错误1项目2结构化数据的NuGet包恢复失败:'Microsoft.NETCore.Platforms 1.0.1'包需要NuGet客户端版本'2.12'或更高版本,但当前的NuGet版本是'2.8.50926.663'..
我在哪里更新NuGet?
创建订阅时,我有时会收到以下错误:
配额"管理员"的令牌不足,并为消费者"project_number"限制服务"pubsub.googleapis.com"的"CLIENT_PROJECT-100s":'
等待它可以解决问题,但我想增加配额.在Google云端控制台的IAM&Admin部分,我可以过滤Pub/Sub API,但无法找到限制...
在 Compute Engine 虚拟机中从 Google Cloud 容器注册表中提取 docker 映像时,我收到一条权限被拒绝的错误消息:
gcloud docker pull -- gcr.io/your-project-id/example-image
Run Code Online (Sandbox Code Playgroud)
结果是:
FATA[0000]发布 http:///var/run/docker.sock/v1.18/images/create?fromImage=gcr.io%2Fyour-project-id%2Fexample-image%3Alatest:拨打unix /var/run /docker.sock:权限被拒绝。您是否尝试在没有 TLS 的情况下连接到启用 TLS 的守护进程?
我从示例和文档中获得了“gcloud docker pull”命令: https: //cloud.google.com/container-registry/docs/pulling
我曾经使用多个运行不同"terraform remote config"命令的.sh文件来切换不同Google Cloud项目中的桶状态文件,用于不同的环境(开发,测试和产品).
在0.9.0版本中,我知道这现在进入了一个.tf文件:
terraform {
backend "gcs" {
bucket = "terraform-state-test"
path = "terraform.tfstate"
project = "cloud-test"
}
}
Run Code Online (Sandbox Code Playgroud)
在0.9.0版本中,现在还有State Environment("terraform env"):
resource "google_container_cluster" "container_cluster" {
initial_node_count = "${terraform.env == "prod" ? 5 : 1}"
}
Run Code Online (Sandbox Code Playgroud)
但是,我现在应该如何使用新的后端配置管理同一目录结构中的多个环境?
我跑步时遇到错误npm install
.它抱怨没有找到模块/ node_modules/ansistyles ...该文件夹确实不存在,但有一个带破折号:/ node_modules/ansi-styles.
npm install
npm WARN helloworld@1.0.0 No repository field.
npm ERR! path /app/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/app/node_modules/npm/node_modules/ansistyles' -> '/app/node_modules/npm/node_modules/.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2018-02-01T13_20_48_203Z-debug.log
Run Code Online (Sandbox Code Playgroud)
我也运行时,碰到了同样的错误cordova plugin …
出于测试目的,我需要模拟 jwt-decode 函数,但我在这里找到的建议都没有帮助。使用 jwtDecode 的代码如下所示
import jwtDecode from 'jwt-decode';
...
const { exp } = jwtDecode(accessToken);
Run Code Online (Sandbox Code Playgroud)
在测试中我需要模拟这个返回exp
值。我尝试按照Mock jwt-decode in Jest中的建议来模拟它
jest.mock('jwt-decode', () => () => ({ exp: 123456 }));
const { exp } = jwtDecode('123456');
Run Code Online (Sandbox Code Playgroud)
但这会返回
InvalidTokenError:指定的令牌无效:无法读取未定义的属性“替换”
cordova ×1
docker ×1
mocking ×1
npm ×1
npm-install ×1
nuget ×1
terraform ×1
testing ×1
ts-jest ×1
typescript ×1