We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b6bff3 commit cafc13aCopy full SHA for cafc13a
packages/payload/src/database/migrations/getPredefinedMigration.ts
@@ -31,14 +31,11 @@ export const getPredefinedMigration = async ({
31
cleanPath = cleanPath.replaceAll('\\', '/')
32
const moduleURL = pathToFileURL(cleanPath)
33
try {
34
- const { downSQL, imports, upSQL } = await eval(`import'${moduleURL.href}')`)
+ const { downSQL, imports, upSQL } = await eval(`import('${moduleURL.href}')`)
35
return { downSQL, imports, upSQL }
36
} catch (error) {
37
- payload.logger.error({
38
- error,
39
- msg: `Error loading predefined migration ${migrationName}`,
40
- })
41
- process.exit(1)
+ payload.logger.error(`Error loading predefined migration ${migrationName}`)
+ throw error
42
}
43
} else {
44
payload.logger.error({
0 commit comments