feathersjs / docs

[MOVED] Legacy Feathers documentation

Home Page:https://crow.docs.feathersjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Comment: Quick start (guides/basics/starting.md)

Canuckaholic opened this issue · comments

Comment/Problem

I'm following the guide but when I get to the Feathers Express part I can't compile in TypeScript:

Unable to compile TypeScript:
app.ts:41:17 - error TS2339: Property 'json' does not exist on type 'FeathersExpress'.

41 app.use(express.json());
                   ~~~~
app.ts:43:17 - error TS2339: Property 'urlencoded' does not exist on type 'FeathersExpress'.

43 app.use(express.urlencoded({ extended: true }));
                   ~~~~~~~~~~
app.ts:45:17 - error TS2339: Property 'static' does not exist on type 'FeathersExpress'.

45 app.use(express.static(__dirname));

Facing this problem any solution ?

For anyone coming in future create a tsconfig.json file like below:

  "compilerOptions": {
    "lib": [ "es2015", "DOM" ],
    "esModuleInterop": true
  }
}