小编Wil*_*ill的帖子

Metro extraNodeModules 不起作用 - 错误:无法解析模块

我有一个现有的 React 本机应用程序。我想创建另一个应用程序并在它们之间共享一些代码。\n我利用 MetroextraNodeModules将共享代码导入到任一应用程序中。\n在任一应用程序中,我希望能够执行以下操作:

\n
// MyApp1/src\\navigation\\app.navigator.js\nimport { someUtilModule } from \'shared\';\n
Run Code Online (Sandbox Code Playgroud)\n

不幸的是,当应用程序包加载到我的开发设备上时,它失败并显示:

\n
error: Error: Unable to resolve module `shared` from `src\\navigation\\app.navigator.js`: shared could not be found within the project or in these directories:\n  C:\\path\\to\\my\\project\n\nIf you are sure the module exists, try these steps:\n 1. Clear watchman watches: watchman watch-del-all\n 2. Delete node_modules: rm -rf node_modules and run yarn install\n 3. Reset Metro\'s cache: yarn start --reset-cache\n 4. Remove the cache: rm -rf /tmp/metro-*\n    at ModuleResolver.resolveDependency …
Run Code Online (Sandbox Code Playgroud)

javascript node-modules react-native metro-bundler

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

Django 数组包含一个字段

我正在使用 Django 和 mongoengine。我有一个带有铭文列表的模型类,我想获取在该列表中具有 id 的文档。

classes = Classes.objects.filter(inscriptions__contains=request.data['inscription'])

django django-queryset

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

无法实例化片段 com.swmansion.rnscreens.Screen

我一直在使用 React Native 0.60.4 为 android 和 ios 开发一个应用程序,最近我发现将应用程序置于分屏或自由格式模式(因为它是屏幕上唯一的应用程序)有时会导致它崩溃。

我进一步玩了这个,发现我可以毫无问题地将应用程序启动到分屏或自由格式模式,但有时调整它的大小会导致它崩溃。下面是我在 Android Studio 中的调试器实例的输出,我正在努力理解:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.myApp, PID: 32150
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myApp/com.myApp.MainActivity}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.swmansion.rnscreens.Screen$ScreenFragment: calling Fragment constructor caused an exception
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
        at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5279)
        at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5187)
        at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.swmansion.rnscreens.Screen$ScreenFragment: calling Fragment constructor caused …
Run Code Online (Sandbox Code Playgroud)

android react-native androidx

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

Azure 相当于 Google Cloud 的服务帐户

我来自谷歌云平台,并且已经习惯于创建服务代理,本质上是用户帐户来授予我指定给非人类参与者的权限/访问权限,以便他们可以查看/修改资源/属性。我整个晚上都在探索 Azure,但找不到类似的东西。谁能建议我应该阅读的 Azure 服务或关键字,以便我弄清楚如何在 Azure 中实现类似的身份和访问?

azure azure-active-directory

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

无法在React Native 0.60.3上安装react-native-unimodules

随装 yarn install react-native-unimodules

说明中的下一步要求我编辑项目Podfile。此处显示了必要的添加。

这是我生成的Podfile

platform :ios, '10.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
target 'MyProjectName' do
  # Pods for MyProjectName
  pod 'React', :path => '../node_modules/react-native/', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',
    'RCTAnimation',
    'RCTImage',
  ]
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod …
Run Code Online (Sandbox Code Playgroud)

cocoapods podspec react-native podfile react-native-ios

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