Skip to content

Disable CLI option Enable loopbackBuild causes exception #5849

@dougal83

Description

@dougal83

Disable CLI option Enable loopbackBuild: use @loopback/build helpers (e.g. lb-eslint) results in exception as follows:

dev@dev-Virtual-Machine:~/workspace$ lb4 app
? Project name: no-helpers
? Project description: workspace
? Project root directory: no-helpers
? Application class name: NoHelpersApplication
? Select features to enable in the project Enable eslint, Enable prettier, Enable mocha, Enable vscode, Enable docker, Enable repositorie
s, Enable services
(node:15691) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: /home/dev/workspace/no-helpers/package.plain.json.ejs
    at EditionInterface.exports.copy (/home/dev/.npm-global/lib/node_modules/@loopback/cli/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:49:3)
    at EditionInterface.module.exports [as move] (/home/dev/.npm-global/lib/node_modules/@loopback/cli/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/move.js:4:8)
    at AppGenerator.scaffold (/home/dev/.npm-global/lib/node_modules/@loopback/cli/lib/project-generator.js:284:15)
    at AppGenerator.scaffold (/home/dev/.npm-global/lib/node_modules/@loopback/cli/generators/app/index.js:135:26)
    at Object.<anonymous> (/home/dev/.npm-global/lib/node_modules/@loopback/cli/node_modules/yeoman-generator/lib/index.js:976:25)
    at /home/dev/.npm-global/lib/node_modules/@loopback/cli/node_modules/run-async/index.js:49:25
    at new Promise (<anonymous>)
    at /home/dev/.npm-global/lib/node_modules/@loopback/cli/node_modules/run-async/index.js:26:19
    at runLoop.add.once.once (/home/dev/.npm-global/lib/node_modules/@loopback/cli/node_modules/yeoman-generator/lib/index.js:977:11)
    at processImmediate (internal/timers.js:456:21)
(node:15691) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:15691) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
dev@dev-Virtual-Machine:~/workspace$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions