loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.95k stars 1.07k forks source link

the path problem in tutorial section of document which the caption is **Creating an Express Application with LoopBack REST API** #8825

Open Barnette-ao opened 2 years ago

Barnette-ao commented 2 years ago

Describe the bug

I just follow the tutorial to creating an express application with loopback REST API in codebox.

after follow the tutorial to create an application use lb4 app Note,add Note model, add a datasource, there is no mistake.

However in the part Create a Facade Express Application(https://loopback.io/doc/en/lb4/express-with-lb4-rest-tutorial.html#create-a-facade-express-application

the code block invoked error and the mistake message as follow:

1. the import path that invoked error

import {ApplicationConfig, NoteApplication} from './application';

mistake massage

the application  can't found the module

2. can't find http.ts

export class ExpressServer {

  public server?: http.Server;

  constructor() {}
}

mistake message

can not find namescape http.ts

and over the issue of import the file , the server.ts file can be import as import {ApplicationConfig, NoteApplication} from './server'; there is no mistake. I don't know why.

Logs

No response

Additional information

No response

Reproduction

https://codesandbox.io/s/patient-microservice-x0vy44?file=/note/src/index.ts

tpoisot commented 1 year ago

the example is missing import http from 'http';