loopbackio / loopbackio/loopback-next

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

Offen
#8,825 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
TypeScript
Sterne
5.1k
Forks
1.1k
Ø Merge
2 T. 21 Std.
Gemergte PRs (30 T.)
27

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem Abschnitt „Create a Facade Express Application“ des verlinkten Tutorials und reproduziere das Problem in der bereitgestellten CodeSandbox. Vergleiche die dokumentierten Imports und die http-Referenz mit den Dateien der generierten Anwendung, einschließlich server.ts. Fertig, wenn das Beispiel aus dem Tutorial ohne die gemeldeten Modul- oder Namespace-Fehler ausgeführt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
express, typescript
Bereich
documentation
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.