小编Dol*_*hin的帖子

“iproxy”无法打开,因为无法验证开发者

今天我用m1芯片连接mac book pro上的数据线来调试flutter应用程序,当我在Android Studio中启动调试过程时Android Studio Bumblebee | 2021.1.1 Patch 2,系统告诉我错误:

\n
\xe2\x80\x9ciproxy\xe2\x80\x9d cannot be opened because the developer cannot be verified.\n
Run Code Online (Sandbox Code Playgroud)\n

这是完整的用户界面:

\n

在此输入图像描述

\n

当我尝试在系统偏好设置 > 安全和隐私设置中解决它以允许 idevice_id 时,我没有找到该设置。我使用的是带有 M1 芯片的 mac book pro,操作系统版本是 macOS Monterey 12.2.1 。

\n

flutter

130
推荐指数
7
解决办法
4万
查看次数

找不到模块“ts-transformer-keys”。您的意思是将“moduleResolution”选项设置为“node”,还是将别名添加到“paths”选项?

我想在我的打字稿项目中使用ts-transformer-keys"typescript": "^4.5.5"。所以我将此依赖项添加到打字稿中package.json

"ts-transformer-keys": "^0.4.3",
Run Code Online (Sandbox Code Playgroud)

并将其添加为tsconfig.json这样:

"plugins": [
      { "transform": "ts-transformer-keys/transformer" }
] 
Run Code Online (Sandbox Code Playgroud)

ts-transformer-keys但是当我在当前项目中导入时:

import { keys } from 'ts-transformer-keys';
Run Code Online (Sandbox Code Playgroud)

显示错误:

Cannot find module 'ts-transformer-keys'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?ts(2792)
Run Code Online (Sandbox Code Playgroud)

为什么会发生这种情况?我应该怎么做才能解决这个问题?我已经运行了yarn命令。节点版本是16.13.2.

typescript

66
推荐指数
2
解决办法
6万
查看次数

意外的标记 '。' 当尝试运行“npm install”时

我正在尝试使用“npm install -g @angular/cli”安装 Angular cli,但遇到以下错误:

npm ERR! Unexpected token '.'
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<user>\AppData\Local\npm-cache\_logs\2022-02-02T15_25_07_320Z-debug-0.log
Run Code Online (Sandbox Code Playgroud)

npm 版本:8.3.1 节点版本:v17.4.0

任何帮助将不胜感激!谢谢 :)

node.js npm angular-cli angular

57
推荐指数
6
解决办法
8万
查看次数

错误:未为类“BuildContext”定义方法“inheritFromWidgetOfExactType”

今天编译我的flutter项目时,显示这个错误:

This will generate a JSON format file containing all messages that 
need to be translated.
../../../.pub-cache/hosted/pub.flutter-io.cn/fish_redux-0.3.4/lib/src/redux_component/page.dart:208:17: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../../apps/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'.
        context.inheritFromWidgetOfExactType(PageProvider);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.3/lib/src/smart_refresher.dart:273:21: Error: The method 'ancestorWidgetOfExactType' isn't defined for the class 'BuildContext'.
 - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../../apps/flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, …
Run Code Online (Sandbox Code Playgroud)

flutter

31
推荐指数
4
解决办法
2万
查看次数

拒绝允许个人访问令牌创建或更新工作流程

今天,当我添加工作流程并将代码推送到 GitHub 远程存储库时,显示此错误:

\n
refusing to allow a Personal Access Token to create or update workflow\n
Run Code Online (Sandbox Code Playgroud)\n

这是完整的错误输出:

\n
~/Documents/GitHub/flutter-netease-music on \xee\x82\xa0 master \xe2\x8c\x9a 12:25:13\n$ git push origin master                                                                                                      \xe2\x80\xb9ruby-2.7.2\xe2\x80\xba\nUsername for 'https://github.com': username\nPassword for 'https://jiangxiaoqiang@github.com':\nEnumerating objects: 19, done.\nCounting objects: 100% (19/19), done.\nDelta compression using up to 12 threads\nCompressing objects: 100% (11/11), done.\nWriting objects: 100% (13/13), 1.86 KiB | 1.86 MiB/s, done.\nTotal 13 (delta 6), reused 0 (delta 0), pack-reused 0\nremote: Resolving deltas: 100% (6/6), completed with 4 local objects.\nTo https://github.com/jiangxiaoqiang/flutter-netease-music.git\n …
Run Code Online (Sandbox Code Playgroud)

github

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

如何从 Kubernetes 获取部署日志?

我正在 Kubernetes 集群(v1.15.2)中创建一个 InfluxDB 部署,这是我的 yaml 文件:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: monitoring-influxdb
  namespace: kube-system
spec:
  replicas: 1
  template:
    metadata:
      labels:
        task: monitoring
        k8s-app: influxdb
    spec:
      containers:
      - name: influxdb
        image: registry.cn-hangzhou.aliyuncs.com/google_containers/heapster-influxdb-amd64:v1.5.2
        volumeMounts:
        - mountPath: /data
          name: influxdb-storage
      volumes:
      - name: influxdb-storage
        emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
  labels:
    task: monitoring
    # For use as a Cluster add-on (https://github.com/kubernetes/kubernetes/tree/master/cluster/addons)
    # If you are NOT using this as an addon, you should comment out this line.
    kubernetes.io/cluster-service: 'true' …
Run Code Online (Sandbox Code Playgroud)

kubernetes

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

psycopg2 和 psycopg2-binary python 包有什么不同

今天我发现python connect postgresql有psycopg2和psycopg2-binary包,我应该选择哪一个?两个包有什么区别?似乎没有人谈论它的差异。似乎 psycopg2 由于依赖关系而很难安装。psycopg2-binary 易于安装,但功能较弱。

python-3.x

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

该文件被视为 ES 模块,因为它具有“.js”文件扩展名

现在我想jtest在 typescript (Node 版本 v16.13.2)项目中进行单元测试,首先我安装 jtest "jest": "^27.5.1"。添加jest.config.js文件:

module.exports = {
    roots: [
        "<rootDir>/test"
    ],
    testRegex: 'test/(.+)\\.test\\.(jsx?|tsx?)$',
    transform: {
        "^.+\\.tsx?$": "ts-jest"
    },
    moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
};
Run Code Online (Sandbox Code Playgroud)

添加测试条目:

import DeviceHandler from "@utils/data/DeviceHandler";

test('hello world test', () => {
    let deviceId = DeviceHandler.getDeviceId();
    expect(deviceId).toBe("xxxx");
});
Run Code Online (Sandbox Code Playgroud)

但是当我运行测试命令时yarn test

ReferenceError: module is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file …
Run Code Online (Sandbox Code Playgroud)

unit-testing typescript

23
推荐指数
1
解决办法
4万
查看次数

ld:在 macOS 中构建 rust 时未找到 -lpq 的库

当我使用以下命令在 macOS 中使用 apple sillicon 构建 rust 项目时:

CARGO_HTTP_MULTIPLEXING=false cargo build
Run Code Online (Sandbox Code Playgroud)

显示这样的错误:

  = note: ld: library not found for -lpq
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我已经尝试安装

brew install libpq
brew link --force libpq
Run Code Online (Sandbox Code Playgroud)

仍然没有解决这个问题,我应该怎么做才能解决这个问题?是不是 PostgreSQL 库现在不​​支持 Apple Silicon(Apple M1 Pro)?这是我的项目依赖项:

[package]
name = "reddwarf_dict"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rocket = { version = "0.5.0-rc.1", features = ["json"] }
serde …
Run Code Online (Sandbox Code Playgroud)

linker-errors rust

22
推荐指数
4
解决办法
8515
查看次数

错误:无法为“ring v0.16.20”运行自定义构建命令

我想在带有 M1 芯片的 macOS Monterey 12.3.1 中使用 musl 构建 rust 1.59 项目,然后运行以下命令:

rustup target add x86_64-unknown-linux-musl
cargo build --release --target=x86_64-unknown-linux-musl
Run Code Online (Sandbox Code Playgroud)

但项目构建输出如下:

error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/Users/foo/source/reddwarf/backend/fortune/target/release/build/ring-98ce1debbcda4321/build-script-build` (exit status: 101)
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("x86_64-unknown-linux-musl")
  HOST = Some("aarch64-apple-darwin")
  CC_x86_64-unknown-linux-musl = None
  CC_x86_64_unknown_linux_musl = None
  TARGET_CC = None
  CC = None
  CROSS_COMPILE = None
  CFLAGS_x86_64-unknown-linux-musl = None
  CFLAGS_x86_64_unknown_linux_musl = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS …
Run Code Online (Sandbox Code Playgroud)

rust rust-cargo musl alpine-linux

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