Skip to content

lb4 export-api-def results in AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: #1943

@oliverkarst

Description

@oliverkarst

Description / Steps to reproduce / Feature proposal

I would like to generate the openapi.json or a swagger definition in any kind. But templates are missing.

Current Behavior

$ lb4 export-api-def
? Project description: nma-services-swagger
? Project root directory: client-swagger
? Application class name: tests
? Select features to enable in the project Enable tslint, Enable prettier, Enable mocha, Enable loopbackBuild, Enable vs
code, Enable repositories, Enable services
events.js:183
throw er; // Unhandled 'error' event
^

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: D:\Users\myname\AppData(Roaming)\npm\node_modules@loopback\cli\generators\project\templates***
at EditionInterface.exports.copy (D:\Users\myname\AppData(Roaming)\npm\node_modules@loopback\cli\node_modules\mem-fs-editor\lib\actions\copy.js:48:3)
at EditionInterface.module.exports [as copyTpl] (D:\Users\myname\AppData(Roaming)\npm\node_modules@loopback\cli\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:29:8)
at AppGenerator.scaffold (D:\Users\myname\AppData(Roaming)\npm\node_modules@loopback\cli\lib\project-generator.js:195:13)
at AppGenerator.scaffold (D:\Users\myname\AppData(Roaming)\npm\node_modules@loopback\cli\generators\app\index.js:109:18)
at Object. (D:\Users\myname\AppData(Roaming)\npm\node_modules@loopback\cli\node_modules\yeoman-generator\lib\index.js:424:27)

Expected Behavior

a file is generated that contains the swagger / openapi definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions