小编Ala*_*tas的帖子

是否可以在React Native中隐藏"BugReporting extraData"?(使用世博会)

每次我打开一个带有Expo的React Native应用程序时,我都会在控制台中收到关于该应用程序的元数据的大量消息,这实际上并没有帮助我调试.特别是因为它每次都是相同的信息,并且每次应用重新加载时都会显示(即使是热重播或实时重新加载):

Running application "main"
with appParams: {
    "rootTag": 171,
    "initialProps": {
        "exp": {
            "manifest": {
                "splash": {
                    "backgroundColor": "#1c2d3c"
                },
                "packagerOpts": {
                    "lanType": "ip",
                    "urlRandomness": "e4-nfi",
                    "hostType": "tunnel",
                    "dev": true,
                    "minify": false
                },
                "debuggerHost": "localhost:19001",
                "bundleUrl": "http://localhost:19001/node_modules/expo/AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false&assetPlugin=pathToProjectFiles",
                "facebookAppId": "FBAppIdGoesHere",
                "android": {
                    "splash": {
                        "xxhdpi": "./src/assets/img/splash-android.png",
                        "backgroundColor": "#1c2d3c",
                        "xxxhdpiUrl": "http://localhost:19001/assets/./src/assets/img/splash-android.png",
                        "xhdpi": "./src/assets/img/splash-android.png",
                        "hdpi": "./src/assets/img/splash-android.png",
                        "xxxhdpi": "./src/assets/img/splash-android.png",
                        "resizeMode": "cover",
                        "ldpi": "./src/assets/img/splash-android.png",
                        "xxhdpiUrl": "http://localhost:19001/assets/./src/assets/img/splash-android.png",
                        "ldpiUrl": "http://localhost:19001/assets/./src/assets/img/splash-android.png",
                        "xhdpiUrl": "http://localhost:19001/assets/./src/assets/img/splash-android.png",
                        "hdpiUrl": "http://localhost:19001/assets/./src/assets/img/splash-android.png",
                        "mdpi": "./src/assets/img/splash-android.png",
                        "mdpiUrl": "http://localhost:19001/assets/./src/assets/img/splash-android.png"
                    },
                    "config": {
                        "googleSignIn": {
                            "apiKey": "APIKeyGoesHere",
                            "certificateHash": …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs react-native expo

14
推荐指数
1
解决办法
1114
查看次数

删除dynamodb中的嵌套属性

假设我在DynamoDB中有这个项目:

{
  "customerId": "customer_001",
  "customerName": "itsme",
  "address": {
    "city": "Frankfurt",
    "country": "Germany",
    "street1": "c/o Company xxx",
    "street2": "Europe",
    "street3": "PO Box 406",
    "zip": "12345"
  }
}
Run Code Online (Sandbox Code Playgroud)

我需要address.street3从项目中删除嵌套属性.我怎么能做到这一点?

这是我的代码如下; 它可以完美地删除非嵌套属性(例如customerName),但是如果我尝试在嵌套属性(例如address.street3)中使用它,它会无声地失败.

const params = {
    TableName: customerTable,
    Key: {
        customerId: customerId,
    },
    AttributeUpdates: {
        'address.street3':
        {
            Action: 'DELETE'
        }
    }
};

dynamoDb.update(params, function (err, data) {
    if (err) {
        console.error("Unable to update customer. Error JSON:", JSON.stringify(err, null, 2));
    }
    else {
        console.log("UpdateCustomer succeeded:", JSON.stringify(data.Attributes));
        responseHelper.ResponseHelper.success(JSON.stringify(data.Attributes), 200, …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services node.js amazon-dynamodb

7
推荐指数
1
解决办法
2451
查看次数

无法解析模块(Expo、React Native)

使用 Expo 构建 React Native 应用程序,Javascript 捆绑包在收到错误后失败Unable to resolve "../stores/__fixtures__/matchlist/matchlistSourceFixture" from "src/containers/MatchlistSwipeContainer.tsx",尽管我 100% 确定该文件存在并且在此实例中其相对路径是正确的 \xe2\x80\x93 尤其是当 I\xe2\ x80\x99m 使用 VSCode,它会抱怨路径是否正确,并且 I\xe2\x80\x99m 使用 VSCode\xe2\x80\x99s 自动完成开始。

\n\n

如果我将文件移动到不带有 __ dunder 后缀的任何其他目录并相应地更新相对路径,它可以完美地找到该文件。

\n\n

我\xe2\x80\x99已经检查了其他类似的主题无法解决模块错误,但它们似乎都与第三方包有关,而这是一个本地文件。

\n\n

进口声明:

\n\n

import { matchlistSourceFixture } from \'../stores/__fixtures__/matchlist/matchlistSourceFixture\';

\n\n

文件中的导出语句matchlistSourceFixture.ts

\n\n

export const matchlistSourceFixture = {...}

\n\n

附件是 Expo iOS 应用程序中错误消息的图像。消息指出该文件甚至不存在\xe2\x80\x99t(顺便说一下,它有一个.ts扩展名)让我认为相对路径\xe2\x80\x99t确实是这里的问题。

\n\n

Expo iOS 应用程序上“无法解析模块”错误的屏幕截图

\n\n

版本:

\n\n
    \n
  • 反应16.3.1
  • \n
  • 世博会27.0.0
  • \n
  • 过期 54.0.0
  • \n
\n

react-native expo

5
推荐指数
1
解决办法
7102
查看次数

如何设置featureCompatibilityVersion而无需访问Ubuntu 16.10中的Mongo shell?

我正在尝试在我的本地机器上安装MongoDB 3.2,运行Ubuntu 16.10.

在安装过程中,没有错误; 然后,当我跑mongod,我得到以下错误:

Cannot start mongod when the featureCompatibilityVersion is higher than 3.2. See http://dochub.mongodb.org/core/3.4-feature-compatibility.

Fatal Assertion 40352

但是,当我在MongoDB的文档中找到该链接时,它显示设置功能兼容性的唯一方法是通过mongoshell.然而,我甚至无法访问它,正如我之前提到的那样,并在下面的终端输出中显示.

我以前安装了MongoDB 3.4,但我需要3.2,因为这是与mLab兼容的最新版本,我将在转向生产时使用.

所以首先我尝试降级它,我遇到了同样的问题.然后我尝试完全卸载3.4(按照卸载说明)并安装3.2.然后我得到了同样的错误.

这是完整的终端输出:

2017-02-10T09:42:10.134+0530 I CONTROL  [initandlisten] MongoDB starting : pid=3465 port=27017 dbpath=/data/db 64-bit host=fluidlan
2017-02-10T09:42:10.134+0530 I CONTROL  [initandlisten] db version v3.2.12
2017-02-10T09:42:10.134+0530 I CONTROL  [initandlisten] git version: ef3e1bc78e997f0d9f22f45aeb1d8e3b6ac14a14
2017-02-10T09:42:10.134+0530 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
2017-02-10T09:42:10.134+0530 I CONTROL  [initandlisten] allocator: tcmalloc
2017-02-10T09:42:10.134+0530 I CONTROL  [initandlisten] modules: none
2017-02-10T09:42:10.134+0530 I …
Run Code Online (Sandbox Code Playgroud)

shell ubuntu mongodb

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