question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows 10/Node 10 can't run migrations

See original GitHub issue

Getting this error on Windows 10/Node v10.15.1/graphile-migrate v0.0.3 when running migrations:

(node:20544) UnhandledPromiseRejectionWarning: Error: Invalid migration header in '${fullPath}'
    at Promise.all.files.filter.map (D:\Programming\hsm\node_modules\graphile-migrate\dist\migration.js:75:19)
(node:20544) 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(). (rejection id: 1)
(node:20544) [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.

Tried using PowerShell, CMD, and Git bash, didn’t seem to make a difference. Migrations work fine on multiple Linux boxes.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
frankdugan3commented, Aug 27, 2019

Sounds good. And yes, I think a lot of people will run into this unintentionally because the default/recommended is auto. PR Soon to follow.

1reaction
frankdugan3commented, Aug 27, 2019

OK, finally was able to test this on my employer’s Windows box. It was just CRLF endings causing the issue. What I did to solve the problem was add a .gitattributes file:

migrations/committed/*.sql text eol=lf

Some people report that git checkout-index --force --all will rewrite the endings, but I found we had to delete and re-clone the project. YMMV. Now, this works because I generate the migrations on Linux. Not sure what would happen if a migration were to be created from Windows. This may need more testing/docs, but I’m happy for my part. Feel free to close if you’re happy with the situation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10: No Found Typescript as compiler in node-migrate
I configured the migrations using node-migrate and scripts layer to run a dummy migration and test all the functionality. The project is in ......
Read more >
Hyper-V live migration failed - Microsoft Q&A
I have 3 host on Win Server 2016 running Hyper V and clustering. Recently not able to live migrate some VM from Host...
Read more >
Installation - db-migrate - Read the Docs
New Instructions Since (v0.10.x) ... and call it via $ node node_modules/db-migrate/bin/db-migrate ... --dry-run Prints the SQL but doesn't run it.
Read more >
Migration | Yarn - Package Manager
Run yarn install to migrate the lockfile; Take a look at this article to see what ... Node.js 10.x reached its official End...
Read more >
Troubleshooting migration - IBM
The Application Migration Toolkit for WebSphere Application Server ... [10/9/08 18:26:40:363 CDT] 00000000 Save 1 Skipped instance dmgr01 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found