maoberlehner / storyblok-migrate

Storyblok schema migrations
MIT License
30 stars 7 forks source link

Installation assistant give error #12

Open MKlblangenois opened 3 years ago

MKlblangenois commented 3 years ago

When I try to migrate components with npx storyblok-migrate, I got the following error :

(node:50895) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'filter' of undefined
    at MultiSelect.filter (/Users/loganblangenois/Documents/Sites/Gatsby/Storyblok/gatsby-starter-sb/node_modules/enquirer/lib/types/array.js:509:26)
    at MultiSelect.get enabled [as enabled] (/Users/loganblangenois/Documents/Sites/Gatsby/Storyblok/gatsby-starter-sb/node_modules/enquirer/lib/types/array.js:620:17)
    at MultiSelect.get selected [as selected] (/Users/loganblangenois/Documents/Sites/Gatsby/Storyblok/gatsby-starter-sb/node_modules/enquirer/lib/types/array.js:636:33)
    at MultiSelect.submit (/Users/loganblangenois/Documents/Sites/Gatsby/Storyblok/gatsby-starter-sb/node_modules/enquirer/lib/types/array.js:546:22)
    at /Users/loganblangenois/Documents/Sites/Gatsby/Storyblok/gatsby-starter-sb/node_modules/enquirer/lib/prompt.js:234:21
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:50895) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:50895) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

But if I run --components args, the migration works correctly

npx storyblok-migrate --component-migrations --components article
Article component has been created
// storyblok/article.js
const metaImageFragment = require("./_meta_image");

module.exports = {
   display_name: "Article",
   is_nestable: false,
   is_root: true,
   name: "article",
   schema: {
      title: {
         pos: 0,
         type: "text",
      }
   },
};