Windows 10/Node 10 can't run migrations
See original GitHub issueGetting 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:
- Created 4 years ago
- Comments:9 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.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: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.