Meithz (Razioner)
Meithz (Razioner)
KKysely
Created by Meithz (Razioner) on 4/2/2023 in #help
Trouble running migrations
I am trying to use Kysely on a svelte-kit project, I set up the migration script like the example shown in the docs, but when trying to run the script with ts-node --esm "path/to/script" I receive failed to migrate
CustomError: ERR_INVALID_MODULE_SPECIFIER src\lib\server\db\migrations\540540540_create_db.ts is not a valid package name E:\Code\Web\portfolio-projects\spotify-cp\node_modules\.pnpm\[email protected]\node_modules\kysely\dist\esm\migration\file-migration-provider.js
CustomError: ERR_INVALID_MODULE_SPECIFIER src\lib\server\db\migrations\540540540_create_db.ts is not a valid package name E:\Code\Web\portfolio-projects\spotify-cp\node_modules\.pnpm\[email protected]\node_modules\kysely\dist\esm\migration\file-migration-provider.js
I tried changin the migration file name, making it a JS file instead of TS but still get the same error, I am not sure what I am doing wrong, the scripts are the same as the examples in the docs.
77 replies