strongloop-archive / loopback-next-hello-world

DEPRECATED Quick start tutorial for LoopBack.next.
http://loopback.io/doc/en/lb4/Examples-and-tutorials.html
Other
6 stars 4 forks source link

Example is broken #24

Closed cajoy closed 7 years ago

cajoy commented 7 years ago

Description/Steps to reproduce

git clone git@github.com:strongloop/loopback-next-hello-world.git cd loopback-next-hello-world yarn install yarn start

danielpiedra commented 7 years ago

Same here.

Running on: Node 8.4.0 / npm 5.4.2

typescript complains about: node_modules/@loopback/authentication/lib/providers/authenticate.d.ts(2,10): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'ParsedRequest'. node_modules/@loopback/authentication/lib/strategy-adapter.d.ts(2,10): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'ParsedRequest'. src/controllers/hello-world.ts(7,9): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'api'. src/index.ts(15,43): error TS2339: Property 'HTTP_PORT' does not exist on type 'typeof CoreBindings'. src/sequence.ts(7,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'FindRoute'. src/sequence.ts(9,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'InvokeMethod'. src/sequence.ts(10,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'ParseParams'. src/sequence.ts(11,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'parseOperationArgs'. src/sequence.ts(12,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'ParsedRequest'. src/sequence.ts(13,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'Reject'. src/sequence.ts(14,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'Send'. src/sequence.ts(15,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'ServerResponse'. src/sequence.ts(16,3): error TS2305: Module '"/Users/danielq/Projects/Playground/loopbackNextEarlyTryout/node_modules/@loopback/core/index"' has no exported member 'SequenceHandler'. src/sequence.ts(19,42): error TS2339: Property 'SequenceActions' does not exist on type 'typeof CoreBindings'.

dhmlau commented 7 years ago

@cajoy, @danielpiedra, there has been a refactoring in @loopback/core that extracts the router to @loopback/rest. For details, please see https://github.com/strongloop/loopback-next/issues/567

We're in the process of updating the documentation, in the meanwhile, the imports can be fixed by using something like this:

  import {
    FindRoute,
    InvokeMethod,
    ParsedRequest,
    ParseParams,
    Reject,
    Send,
    ServerResponse,
    SequenceHandler,
    RestBindings,
  } from '@loopback/rest';
dhmlau commented 7 years ago

@cajoy, @danielpiedra, with the example snippet above, i believe we've helped with your question. Closing this issue. If you still encounter the problem, feel free to reopen. Thanks for taking an early look for LoopBack4!