deepkit-framework icon indicating copy to clipboard operation
deepkit-framework copied to clipboard

Bug: missing shebang in bin/deepkit-sql.js @deepkit/sql

Open rktyt opened this issue 1 year ago • 1 comments

I'm trying to use @deepkit/orm standalone.

  1. https://github.com/deepkit/deepkit-framework/blob/v1.0.1-alpha.153/packages/sql/bin/deepkit-sql.js There's no shebang. Therefore, the command cannot be used with npx deepkit-sql.

    $ npx deepkit-sql --help
    /tmp/my-deepkit-app/node_modules/.bin/deepkit-sql: 1: Syntax error: word unexpected (expecting ")")
    
    $ node node_modules/.bin/deepkit-sql --help
    USAGE
      $ node deepkit-sql [COMMAND]
    
    COMMANDS
    migration
      migration:create   Generates a new migration file based on a database diff.
      migration:down     Executes down migration, reverting old migration files.
      migration:pending  Shows pending migration files.
      migration:up       Executes pending migration files. Use migration:pending to see which are pending.
    
    For more information on a specific command or topic, type '[command/topic] --help'
    
  2. It seems that the arguments are not being handled correctly. I tried what the documentation says, but it doesn't work. https://deepkit.io/documentation/orm/migrations

    node ./node_modules/.bin/deepkit-sql migration:create --path database.ts --migrationDir src/migrations
    No databases detected. Use --path path/to/database.ts
    done
    

rktyt avatar Jul 11 '24 06:07 rktyt

I got the same error with deepkit-sql migration:create following document

% ./node_modules/.bin/deepkit-sql migration:create --path src/app/database.ts --migrationDir src/migrations
No databases detected. Use --path path/to/database.ts
done

xVanTuring avatar Jun 17 '25 02:06 xVanTuring