bladey Github contribution chart
bladey Github Stats
bladey Most Used Languages

Activity

24 Aug 2022

Issue Comment

Bladey

Multiple graphql instances (Error: Cannot use GraphQLScalarType, ensure only one instance of "graphql")

It seems the recent release of the 19th August 2022 upgraded graphql dependency to fix a security vulnerability, yet the @keystone-6/auth package did not and this now causes issues with build. To replicate... Upgrade keystone dependencies to the below as per recent release.

"@keystone-6/auth": "4.0.1",
"@keystone-6/core": "2.2.0",
"@keystone-6/document-renderer": "1.1.1",
"@keystone-6/fields-document": "4.1.0",
"@keystone-ui/fields": "7.1.1", 

Try and run yarn. You will see....

Error: Cannot use GraphQLScalarType "{ name: "String", description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", specifiedByURL: undefined, serialize: [function serialize], parseValue: [function parseValue], parseLiteral: [function parseLiteral], extensions: {}, astNode: undefined, extensionASTNodes: [] }" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
    at instanceOf (/Users/skin/Projects/activeProjects/0197_LL_SiteRebuild/lokalliving-stack/keystone6/node_modules/@keystone-6/core/node_modules/graphql/jsutils/instanceOf.js:35:13)
    ... 

On inspection of the dependency tree we can see this is true.

├─┬ @keystone-6/auth@4.0.1
│ └── graphql@15.8.0
├─┬ @keystone-6/core@2.2.0
│ ├─┬ @apollo/client@3.6.9
│ │ ├─┬ @graphql-typed-document-node/core@3.1.1
│ │ │ └── graphql@16.6.0 deduped
│ │ ├─┬ graphql-tag@2.12.6
│ │ │ └── graphql@16.6.0 deduped
│ │ └── graphql@16.6.0
│ ├─┬ @graphql-tools/schema@9.0.1
│ │ ├─┬ @graphql-tools/merge@8.3.3
│ │ │ └── graphql@16.6.0 deduped
│ │ ├─┬ @graphql-tools/utils@8.10.0
│ │ │ └── graphql@16.6.0 deduped
│ │ └── graphql@16.6.0 deduped
│ ├─┬ @graphql-ts/extend@0.4.1
│ │ └── graphql@16.6.0 deduped
│ ├─┬ @graphql-ts/schema@0.5.3
│ │ └── graphql@16.6.0 deduped
│ ├─┬ @types/apollo-upload-client@17.0.1
│ │ └── graphql@16.6.0 deduped
│ ├─┬ apollo-server-core@3.10.1
│ │ ├─┬ @apollo/utils.usagereporting@1.0.0
│ │ │ ├─┬ @apollo/utils.dropunuseddefinitions@1.1.0
│ │ │ │ └── graphql@16.6.0 deduped
│ │ │ ├─┬ @apollo/utils.printwithreducedwhitespace@1.1.0
│ │ │ │ └── graphql@16.6.0 deduped
│ │ │ ├─┬ @apollo/utils.removealiases@1.0.0
│ │ │ │ └── graphql@16.6.0 deduped
│ │ │ ├─┬ @apollo/utils.sortast@1.1.0
│ │ │ │ └── graphql@16.6.0 deduped
│ │ │ ├─┬ @apollo/utils.stripsensitiveliterals@1.2.0
│ │ │ │ └── graphql@16.6.0 deduped
│ │ │ └── graphql@16.6.0 deduped
│ │ ├─┬ @apollographql/apollo-tools@0.5.4
│ │ │ └── graphql@16.6.0 deduped
│ │ ├─┬ @graphql-tools/mock@8.7.3
│ │ │ └── graphql@16.6.0 deduped
│ │ ├─┬ @graphql-tools/schema@8.5.1
│ │ │ ├─┬ @graphql-tools/merge@8.3.1
│ │ │ │ └── graphql@16.6.0 deduped
│ │ │ ├─┬ @graphql-tools/utils@8.9.0
│ │ │ │ └── graphql@16.6.0 deduped
│ │ │ └── graphql@16.6.0 deduped
│ │ ├─┬ apollo-server-plugin-base@3.6.2
│ │ │ └── graphql@16.6.0 deduped
│ │ └── graphql@16.6.0 deduped
│ ├─┬ apollo-server-errors@3.3.1
│ │ └── graphql@16.6.0 deduped
│ ├─┬ apollo-server-express@3.10.1
│ │ └── graphql@16.6.0 deduped
│ ├─┬ apollo-server-types@3.6.2
│ │ └── graphql@16.6.0 deduped
│ ├─┬ apollo-upload-client@17.0.0
│ │ └── graphql@16.6.0 deduped
│ ├─┬ graphql-type-json@0.3.2
│ │ └── graphql@16.6.0 deduped
│ ├─┬ graphql-upload@15.0.2
│ │ └── graphql@16.6.0 deduped
│ └── graphql@15.8.0
└─┬ @keystone-6/fields-document@4.1.0
  └── graphql@15.8.0 

This can be also confirmed by inspecting the source code packages/auth/package.json

It seems auth package missed the upgrade. This is actually a non issue for me as I have built my own Auth and Access extension based on the original so I not longer need the @keystone-6/auth package, yet others are going to experience this problem I believe.

Forked On 24 Aug 2022 at 06:17:21

Bladey

Thanks for this information, solved my issue!

Commented On 24 Aug 2022 at 06:17:21

Bladey

Update README.md

Pushed On 23 Aug 2022 at 11:49:11

Bladey

updated dependencies, added heroku button, added health route

Pushed On 23 Aug 2022 at 11:48:29

Bladey

Hosted conversion (#1)

  • Initial commit.

  • Tweaks.

  • Update ecosystem.json

  • Progress commit.

  • Update index.js

  • Update index.js

  • Progress commit.

  • Update ecosystem.json

  • Update config.js

  • Tweaks.

  • Initial commit.

  • Create Procfile

  • Update Procfile

  • Tweaks.

  • Delete Procfile

Pushed On 23 Aug 2022 at 11:48:29

Bladey

Attempting disabling socket mode.

Pushed On 23 Aug 2022 at 11:48:29

Bladey

dont send the detailed message to default users (#2)

Pushed On 23 Aug 2022 at 11:48:29

Bladey

Update index.js

Pushed On 23 Aug 2022 at 11:48:29
Issue Comment
Bladey Issue Comment expo/expo

Bladey

[expo-av] Can't set any styles to <Video> on react-native-web

Summary

Setting a style prop to <Video> won't apply any styles to the actual <video> element on Web. Not sure if react-native-web is the real problem here or expo-av, since using the default HTMLElement <video> (lowercase) works as intended.

The <Video> element will be wrapped into a <div> and the styles will be applied to the parent <div> instead of the HTML5 <video> Element. What I've seen so far is, that the Video element always receives an inline style with object-fit (value none if nothing was supplied) and maybe removing other styles.

This cause various issues on iOS Safari, since the video needs width: 100%; and height: 100% to fit the parent. The fitting works without width/height on default desktops but not on iOS Safari, resulting into a cropped video.

 <Video
    style={{
        flex: 1,
        width: 220,
        height: 220,
        alignSelf: "center",
    }}
    source={item.asset}
    resizeMode="cover"
    isLooping
    shouldPlay
    isMuted
   /> 

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Web

SDK Version (managed workflow only)

43

Environment

 Expo CLI 4.13.0 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.10.0 - /usr/local/bin/node
      Yarn: 1.22.15 - /usr/local/bin/yarn
      npm: 7.24.0 - /usr/local/bin/npm
    Managers:
      CocoaPods: 1.11.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.6953283
      Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
    npmPackages:
      @expo/webpack-config: ^0.16.8 => 0.16.8 
      expo: ^43.0.3 => 43.0.3 
      react: 17.0.2 => 17.0.2 
      react-dom: 17.0.2 => 17.0.2 
      react-native: 0.64.2 => 0.64.2 
      react-native-web: 0.17.1 => 0.17.1 
    npmGlobalPackages:
      expo-cli: 4.13.0
    Expo Workflow: managed 

Reproducible demo

import { Video } from "expo-av";

  <Video
    style={{
        flex: 1,
        width: 220,
        height: 220,
        alignSelf: "center",
    }}
    source={item.asset}
    resizeMode="cover"
    isLooping
    shouldPlay
    isMuted
   /> 

Forked On 08 Aug 2022 at 12:52:00

Bladey

Having the same issue.

Commented On 08 Aug 2022 at 12:52:00