小编eza*_*ain的帖子

如何在gcloud中更改活动配置文件?

我使用命令创建了一个新的配置文件:

gcloud init 
Run Code Online (Sandbox Code Playgroud)

现在我不知道如何切换到旧的配置文件而不覆盖它.

使用gcloud config我无法切换到另一个配置只设置当前配置的属性.

任何的想法?

google-compute-engine gcloud gcloud-cli

39
推荐指数
1
解决办法
2万
查看次数

IntelliJ无法识别基本Ionic2项目中的Promise类型

我正在开发一个Ionic 2 rc.1应用程序,我使用的是idea 2016.2.4.

项目运行正常,但IDE无法识别Promise的typescript定义,因为它似乎"不包含在tsconfig.json中"

检查错误是: Corresponding file is not included in tsconfig.json

我的tsconfig.json看起来像那样:

{
    "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "dom",
      "es2015"
    ],
    "module": "es2015",
    "moduleResolution": "node",
    "target": "es5"
  },
  "exclude": [
    "node_modules"
  ],
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  }
}
Run Code Online (Sandbox Code Playgroud)

如果我从"exclude"块中删除node_modules,那么我对IDE检查没有问题,但项目运行ionic serve在lint阶段失败.

这是我的package.json

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build", …
Run Code Online (Sandbox Code Playgroud)

intellij-idea typescript ionic2

8
推荐指数
1
解决办法
1644
查看次数

Heroku日志警告"(节点)sys已弃用.使用util代替"脚本运行时

我在heroku中部署了一个节点脚本,由调度程序运行.但是当脚本运行时,我会在日志中看到警告.

Dec 07 11:01:10 xxx heroku/scheduler.3255 Starting process with command `node bin/script` 
Dec 07 11:01:13 xxx app/scheduler.3255:  (node) sys is deprecated. Use util instead. 
Run Code Online (Sandbox Code Playgroud)

我还没有宣布engine我的一个部分package.json.

节点版本有问题吗?我该如何避免这种警告?

谢谢!

javascript heroku node.js

6
推荐指数
1
解决办法
5101
查看次数