feathersjs / docs

[MOVED] Legacy Feathers documentation
https://crow.docs.feathersjs.com/
MIT License
242 stars 532 forks source link

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

Closed Canuckaholic closed 4 years ago

Canuckaholic commented 4 years ago

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));
farhantahir commented 3 years ago

Facing this problem any solution ?

farhantahir commented 3 years ago

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

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