keystone: Cloudinary field doesn't work on Node 13.3.2

Bug report

Not sure if this is upstream or not…

Trying to use the cloudinary field on Node 13.3.2. It gives the error (node:50514) [DEP0135] DeprecationWarning: ReadStream.prototype.open() is deprecated in the console and a ‘nested error’ in the Admin UI.

Reverting back to node 12.13 fixes it for now

System information

  • OS: Mac OS Catalina

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 16 (16 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed in @keystonejs/keystone@18.0.0.

Fixed it! I was using npm, not yarn, which doesn’t have resolutions.

So the fix is to use the above resolution with your package.json, but add this script:

"preinstall": "npx npm-force-resolutions"

Can confirm this is still an issue:

{
  errors: [
    {
      message: 'Nested errors occurred',
      name: 'NestedError',
      time_thrown: '2020-04-09T04:01:45.532Z',
      data: {
        errors: [
          {
            name: 'RangeError',
            message: 'Maximum call stack size exceeded',
            stack:
              'ReadStream.open (/Users/timleslie/src/keystone-5/node_modules/fs-capacitor/lib/index.js:1:1)\nReadStream.open (/Users/timleslie/src/keystone-5/node_modules/fs-capacitor/lib/index.js:94:11)\nReadStream.open (/Users/timleslie/src/keystone-5/node_modules/fs-capacitor/lib/index.js:94:11)\nReadStream.open (/Users/timleslie/src/keystone-5/node_modules/fs-capacitor/lib/index.js:94:11)\nReadStream.open (/Users/timleslie/src/keystone-5/node_modules/fs-capacitor/lib/index.js:94:11)\nReadStream.open (/Users/timleslie/src/keystone-5/node_modules/fs-capacitor/lib/index.js:94:11)\nReadStream.open (/Users/timleslie/src/keystone-5/node_modules/fs-capacitor/lib/index.js:94:11)\n',
          },
        ],
      },
      uid: 'ck8s8ir7d000badmu2v3ueivc',
    },
  ],
  data: { updateUser: null },
  extensions: {
    tracing: {
      version: 1,
      startTime: '2020-04-09T04:01:45.520Z',
      endTime: '2020-04-09T04:01:45.529Z',
      duration: 8665000,
      execution: {
        resolvers: [
          {
            path: ['updateUser'],
            parentType: 'Mutation',
            fieldName: 'updateUser',
            returnType: 'User',
            startOffset: 182591,
            duration: 8153392,
          },
        ],
      },
    },
  },
};

Node:

$ node --version
v13.12.0

package.json

  "dependencies": {
    "@apollo/react-hooks": "^3.1.3",
    "@apollo/react-ssr": "^3.1.3",
    "@emotion/core": "^10.0.27",
    "@keystonejs/adapter-mongoose": "^8.0.0",
    "@keystonejs/app-admin-ui": "^5.9.5",
    "@keystonejs/app-graphql": "^5.1.5",
    "@keystonejs/app-next": "^5.1.2",
    "@keystonejs/auth-password": "^5.1.5",
    "@keystonejs/email": "^5.1.2",
    "@keystonejs/fields": "^9.0.0",
    "@keystonejs/fields-wysiwyg-tinymce": "^5.2.3",
    "@keystonejs/file-adapters": "^6.0.1",
    "@keystonejs/keystone": "^8.0.0",
    "@keystonejs/session": "^6.0.1",
    "apollo-cache-inmemory": "^1.6.5",
    "apollo-client": "^2.6.8",
    "apollo-upload-client": "^12.1.0",
    "body-parser": "^1.18.2",
    "cross-env": "^7.0.0",
    "date-fns": "^1.30.1",
    "dotenv": "^8.2.0",
    "eslint-plugin-emotion": "^10.0.27",
    "express": "^4.17.1",
    "facepaint": "^1.2.1",
    "get-contrast": "^2.0.0",
    "graphql-tag": "^2.10.1",
    "isomorphic-unfetch": "^3.0.0",
    "lodash.uniqby": "^4.7.0",
    "next": "^9.3.2",
    "prop-types": "^15.7.2",
    "react": "^16.13.0",
    "react-dom": "^16.13.0",
    "react-toast-notifications": "^2.3.0",
    "react-use-form-state": "^0.12.0",
    "uuid": "^3.3.2"
  },

Still an issue on node v13.9.0 with these deps:

    "@keystonejs/adapter-mongoose": "^5.2.0",
    "@keystonejs/app-admin-ui": "^5.8.0",
    "@keystonejs/app-graphql": "^5.1.0",
    "@keystonejs/app-next": "^5.1.0",
    "@keystonejs/auth-password": "^5.1.0",
    "@keystonejs/build-field-types": "^5.2.0",
    "@keystonejs/fields": "^6.3.0",
    "@keystonejs/fields-datetime-utc": "^5.1.0",
    "@keystonejs/fields-wysiwyg-tinymce": "^5.1.0",
    "@keystonejs/file-adapters": "^5.5.0",
    "@keystonejs/keystone": "^5.5.0",
    "@keystonejs/list-plugins": "^5.1.0",