-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundstatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Description
Bug report
Describe the bug
When using the 4.2.0-beta.0 with typescript I get an error when I programatically load Strapi like this:
const strapi = require('@strapi/strapi');
// ...
const app = await strapi().load();
Steps to reproduce the behavior
npx create-strapi-app@beta test-app-beta --tsuse quickstart methodcd test-app-betayarn add strapi-plugin-config-syncyarn config-sync diff- See error
Expected behavior
Strapi to load correctly
Code snippets (the error)
(node:96471) UnhandledPromiseRejectionWarning: Error: Unknown dialect undefined
at getDialectClass (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/@strapi/database/lib/dialects/index.js:12:13)
at getDialect (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/@strapi/database/lib/dialects/index.js:19:23)
at new Database (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/@strapi/database/lib/index.js:38:20)
at Function.Database.init (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/@strapi/database/lib/index.js:84:33)
at Strapi.bootstrap (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/@strapi/strapi/lib/Strapi.js:383:30)
at Strapi.load (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/@strapi/strapi/lib/Strapi.js:446:16)
at async Command.<anonymous> (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/strapi-plugin-config-sync/server/cli.js:220:17)
at async Command.parseAsync (/Users/boazpoolman/Code/boazpoolman/strapi/test-app-beta/node_modules/strapi-plugin-config-sync/node_modules/commander/lib/command.js:923:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:96471) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:96471) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
System
- Node.js version: v14.19.0
- Strapi version: 4.2.0-beta.0
- Database: sqlite
- Operating system: Mac OS (M1)
Additional context
When I do an non-typescript install of the beta this issue does not happen.
Metadata
Metadata
Assignees
Labels
issue: bugIssue reporting a bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundIf it breaks the basic use of the product but can be worked aroundstatus: confirmedConfirmed by a Strapi Team member or multiple community membersConfirmed by a Strapi Team member or multiple community members
Type
Projects
Status
Archived