Итак, я просто создал новый проект Feathersjs с feathers generate app
и решил использовать Typescript. Я бегу перья версии 4.2.1. До этого момента все нормально. Но когда я создаю новый сервис с feathers generate service
и пытаюсь запустить его (не меняя ничего), я получаю три ошибки:
src/sequelize.ts:9:20 - error TS2532: Object is possibly 'undefined'.
9 const database = connection.path.substring(1, connection.path.length);
~~~~~~~~~~~~~~~
src/sequelize.ts:9:49 - error TS2532: Object is possibly 'undefined'.
9 const database = connection.path.substring(1, connection.path.length);
~~~~~~~~~~~~~~~
src/sequelize.ts:12:25 - error TS2351: This expression is not constructable.
Type 'typeof import(PATH)' has no construct signatures.
12 const sequelize = new Sequelize(database, username, password, {
Found 3 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! project-2-backend@0.0.0 compile: `shx rm -rf lib/ && tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the project-2-backend@0.0.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Разве недостаточно генерировать приложение перьев с выбором Typescript? Нужно ли устанавливать какие-либо другие зависимости, чтобы это работало?