You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fresh install of feathers via cli. (JS, postgres, typebox, etc.)
Create migration via npm run migrate:make
Run migration npm run migrate
Expected behavior
Template for knex migration should match the ES modules style generated by the CLI.
Actual behavior
Error is thrown:
exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '.../api/protoFJ/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '.../api/protoFJ/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file://.../api/protoFJ/migrations/20240229202710_users.js:5:1
at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:431:15)
at async .../api/protoFJ/node_modules/knex/lib/migrations/migrate/Migrator.js:86:15
at async Promise.all (index 0)
at async Migrator.latest (.../api/protoFJ/node_modules/knex/lib/migrations/migrate/Migrator.js:83:9)
at async Command.<anonymous> (.../api/protoFJ/node_modules/knex/bin/cli.js:250:32)
Current template output with knex
exports.up=function(knex){};
Should likely be
exportasyncfunctionup(knex){}
System configuration
Module versions
Feathers: 5.0.23
Knex: 3.1.0
NodeJS version: v20
Operating System: OSX
The text was updated successfully, but these errors were encountered:
Steps to reproduce
npm run migrate:make
npm run migrate
Expected behavior
Template for knex migration should match the ES modules style generated by the CLI.
Actual behavior
Error is thrown:
Current template output with knex
Should likely be
System configuration
Module versions
Feathers: 5.0.23
Knex: 3.1.0
NodeJS version: v20
Operating System: OSX
The text was updated successfully, but these errors were encountered: