contentful / contentful-migration

🚚 Migration tooling for contentful
MIT License
325 stars 150 forks source link

Migration fails when "yes" parameter is not set #226

Closed MadsGosvig closed 1 year ago

MadsGosvig commented 5 years ago

Expected Behavior

Migration run successfully.

Actual Behavior

Migration hangs after confirmation of changes yes parameter = false.

When I try to run the 01-angry-dog.js migration on my space, the CLI gives the following output:


Environment: development

Create Content Type doggo
  - name: "angry doggo"
  - description: "super angry"

  Create field woofs
    - name: "woof woof"
    - type: "Number"
    - required: true

Publish Content Type doggo
? Do you want to apply the migration (Y/n)

When I press Y/Yes/Enter, I get the following message:

? Do you want to apply the migration Yes

And then nothing happens. In Contentful the content model will remain in DRAFT status. I have tried to wait for up to 2 hours, but nothing happens.

When I use true = yes it works as expected.

Steps to Reproduce

  1. Download 01-angry.dog.js
  2. Create file index.js with following content:
    
    const { runMigration } = require('contentful-migration/built/bin/cli');
    const path = require('path');

async function run() { const options = { spaceId: '', accessToken: ', environmentId: 'development', };

try { await runMigration({ ...options, ...{ filePath: path.join(__dirname, '01-angry-dog.js') }, }); } catch (error) { console.log(error); throw error; } }

run().then(() => process.exit(0));


3. run `node index.js`
4. Confirm changes with Y/Yes/Enter

## Environment

<!--
Include as many relevant details about the environment you experienced the bug in
-->

-   **Node Version**: v10.16.3<!-- output of `node -v` -->
-   **Package Manager Version**: 6.9.0 <!-- output of `npm -v` -->
-   **Operating System**: Windows 64-bit<!-- output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows) -->
-   **Package Version**: ^1.0.1<!-- e.g. v6.0.0 -->
patelveep commented 4 years ago

I am facing the same issue, after the confirmation of changes the migration hangs. No error or aborting the script message is shown. I have tried to wait for more than 1 hour. In my case, nothing is reflected in the contentful as well.

andreilaptev commented 4 years ago

Hi all. Any updates about this? Also run into this issue, weird that Mac beside works normally

sailajagajulalilly commented 4 years ago

We had faced this problem on Windows 10 cmd but we could run with no problems on Windows 10 Git Bash. I hope this helps!

rhafner commented 4 years ago

We had faced this problem on Windows 10 cmd but we could run with no problems on Windows 10 Git Bash. I hope this helps!

This helped, thanks a lot. But only when running Git Bash on windows as standalone. When integrating the Git Bash as default shell in Visual Studio Code I still experience that the process just bogs down.

mayakarabula commented 1 year ago

This ticket has been closed due to inactivity. If you still need help resolving your issue, please reach out through our community Slack, or contact Contentful support directly.