小编sak*_*a73的帖子

npm ci 只能安装具有现有 package-lock.json 或 npm-shrinkwrap.json 且 lockfileVersion >= 1 的软件包

npm ci这是我在 GitHub Action 文件中运行命令安装依赖项时遇到的问题。

我正在开发一个博览会管理的应用程序,并用作GitHub ActionsCI 来触发构建,每当我将代码推送到developmemt分支时。

这是我的构建脚本:

name: EAS PIPELINE
on:
  push:
    branches:
      - development
  workflow_dispatch:

jobs:
  build:
    name: Install and build
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          persist-credentials: false

      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Setup Expo
        uses: expo/expo-github-action@v6
        with:
          expo-version: 4.x
          token: ${{ secrets.EXPO_TOKEN }}
          expo-cache: true

      - name: Install dependencies
        run: npm ci

      - name: Build on EAS
        run: EAS_BUILD_AUTOCOMMIT=${{1}} npx eas-cli …
Run Code Online (Sandbox Code Playgroud)

continuous-integration npm expo github-actions

79
推荐指数
7
解决办法
13万
查看次数

'RCTBundleURLProvider' 没有可见的 @interface 声明选择器 'jsBundleURLForBundleRoot:fallbackResource:'

这是我在构建应用程序时遇到的错误。

在我的文件中将反应本机版本从 升级到 后,我收到此0.66.2错误。0.68.2Appdelegate.mm

在此输入图像描述

ios appdelegate react-native

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

如何在活动底部选项卡下添加指示器?

我需要为活动选项卡添加一个指示器,我尝试添加 borderBottom,tabStyle但我们无法检查焦点。

使用react-navigation v5createBottomTabNavigator作为底部选项卡。

这是输出图像

这是我的代码:

<BottomTab.Navigator
      tabBarOptions={{
        activeTintColor: colors.brown,
        labelPosition: 'below-icon',
      }}>
      <BottomTab.Screen
        name="Home"
        component={HomeTabNav}
        options={{
          tabBarLabel: 'Home',
          tabBarIcon: ({focused}) => {
            return focused ? (
              <HomeSelectedIcon height={ms(24)} width={ms(24)} />
            ) : (
              <HomeIcon height={ms(24)} width={ms(24)} />
            );
          },
        }}
      />
     ...
    </BottomTab.Navigator>
  );
};
Run Code Online (Sandbox Code Playgroud)

提前致谢!

react-native react-navigation react-navigation-bottom-tab

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

dyld:未加载库:@rpath/OneSignal.framework/OneSignal

尝试整合one signal到我的反应本机应用程序中。

我遵循了文档https://documentation.onesignal.com/docs/react-native-sdk-setup中提到的所有说明 。

应用程序的构建成功,但在将应用程序附加到设备时出现错误。

Xcode 打开一个标题为 的线程dyld__abort_with_payload

这是它的图像。 在此输入图像描述

当我调查错误时。错误看起来像这样。

dyld: Library not loaded: @rpath/OneSignal.framework/OneSignal
  Referenced from: /Users/sakshyaarora/Library/Developer/CoreSimulator/Devices/357B8E50-B8A6-4F9D-AE06-40DD8004351E/data/Containers/Bundle/Application/242BEDF6-76CD-4516-BF58-C86C43F6C4D4/Test.app/Test
  Reason: image not found
dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/sakshyaarora/Library/Developer/CoreSimulator/Caches/dyld/20F71/com.apple.CoreSimulator.SimRuntime.iOS-14-5.18E182
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_LIBRARY_PATH=/Users/sakshyaarora/Library/Developer/Xcode/DerivedData/Test-djshtsdmeowdbaebqzmujevyppyj/Build/Products/Debug-iphonesimulator:/Users/sakshyaarora/Sites/projects/Test/Builds/iOS/build/Debug/-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applica
Run Code Online (Sandbox Code Playgroud)

我尝试这个已经好几个小时了。任何帮助,将不胜感激。

提前致谢。:)

xcode push-notification react-native react-native-onesignal

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

npm 错误!git@github.com:权限被拒绝(公钥)。在 GitHub 操作中

npm ci这是我在 GitHub 操作文件中运行命令时遇到的问题。

Run npm ci
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/------
npm ERR! 
npm ERR! Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! 
npm ERR! exited …
Run Code Online (Sandbox Code Playgroud)

continuous-integration expo github-actions

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

找不到参数的compile()方法[com.facebook.react:react-native:+]

当我将 rn 版本从 升级0.66.20.68.2.

什么地方出了错

评估项目“:react-native-os”时出现问题。

在 org.gradle.api.internal.artifacts.dsl.dependency.DefaultDependencyHandler 类型的对象上找不到参数 [com.facebook.react:react-native:+] 的方法compile()。

android react-native

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

无法加载项目的配置 - React Native 0.70.5

将我的反应本机版本从 升级0.68.50.70.5. 我在启动 JS 捆绑程序时不断收到此错误。

在此输入图像描述

我尝试了多种方法,例如升级@react-native-community/clipackage.json 文件中的版本等,但没有任何效果。

有人对这个问题有任何想法吗?

提前致谢!

react-native expo

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

FlatList 在 Android 上无法在 BottomSheet 内工作

我在用gorhom/react-native-bottom-sheet

我面临的问题:

我有一个FlatListinside a BottomSheet,我可以FlaLlist在 ios 上滚动,但在 android 上不起作用。

react-native bottom-sheet react-native-flatlist

3
推荐指数
1
解决办法
5502
查看次数

使用 Hermes JS 引擎时返回无效日期的时刻

当我使用jsc引擎时,一切工作正常,但是当我在反应本机应用程序中从jsc引擎切换到Hermes引擎时,我开始在使用时刻时收到无效日期。

代码:

const defaultDate = moment(currentTimeStamp).format("YYYY/MM/DD"); //till this it works fine
return moment(defaultDate).toDate().getTime(); // throws INVALID DATE
Run Code Online (Sandbox Code Playgroud)

momentjs react-native moment-timezone react-native-hermes

3
推荐指数
1
解决办法
1356
查看次数

如何在redux中更新对象中的特定值

我的减速机:

   function updatePersonDetailsReducer (state = {
        updatePersonDetails: {
            name: "John",
            id: "3ery4",
            address: "somewhere on earth"
        }
    }, action) {
        switch (action.type) {
            case C.UPDATE_PERSON_DETAILS: {
                return {
                    ...state
                    ,updatePersonDetails :action.payload
                }
            }
            default : {}
        }
        return state
    }
Run Code Online (Sandbox Code Playgroud)

我在我的组件中这样调用,

this.props.dispatch(updatePersonDetails({name:Variant.objValue.name,id:Variant.objValue.Id}))
Run Code Online (Sandbox Code Playgroud)

但这似乎是创建一个新数组,而不是updatePersonDetails在reducer中覆盖当前数组()中的值。

reactjs redux react-redux

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