db-migrate / node-db-migrate

Database migration framework for node
Other
2.32k stars 360 forks source link

Yarn install doesn't work and results in failed install. #832

Closed verschaevesiebe closed 1 day ago

verschaevesiebe commented 4 months ago

I'm submitting a...

Current behavior

Can't currently install the package with YARN as it gives an error on node-gyp. (visual studio reference) as weird as it sounds.

Expected behavior

Install correctly with yarn and find db-migrate in terminal

Environment


db-migrate version: latest

Additional information:
- Node version: 18 & 20
- Platform:  Windows            
abz98 commented 3 months ago

The db-migrate-mysql and db-migrate-sqlite3 packages need Python and node-gyp for compilation because they rely on native modules. Unlike Node.js, Yarn doesn't handle compilation on its own and depends on system dependencies instead.

To support installation via Yarn, it's recommended to add a pre-install script in the package.json file. This script would ensure that the necessary system dependencies are installed before attempting to install the packages.