Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--engine throws Engine has not resolved #240

Closed
MiguelDomingues opened this issue Jul 5, 2020 · 2 comments · Fixed by #242
Closed

--engine throws Engine has not resolved #240

MiguelDomingues opened this issue Jul 5, 2020 · 2 comments · Fixed by #242
Labels
bug Something isn't working

Comments

@MiguelDomingues
Copy link

With version 0.18.0 I was able to use the following custom engine:

const { Marp } = require('@marp-team/marp-core')
const markdownItAttrs = require('markdown-it-attrs')
module.exports = opts => new Marp(opts).use(markdownItAttrs)

by using the following commands:

npm install @marp-team/marp-core markdown-it-attrs --save-dev
marp --engine ./engine.js slide-deck.md

With versions 0.18.1 and 0.18.2 I get the following error: [ ERROR ] The specified engine has not resolved.

Adding the "import-from" back to the "dependencies" of package.json solves the issue.

@yhatt yhatt added the bug Something isn't working label Jul 5, 2020
@yhatt
Copy link
Member

yhatt commented Jul 5, 2020

Thanks for your report. To reduce dependencies, we had bundled some modules in #233 (>= v0.18.1). But dynamic require() by import-from throws error by rollup: Error: Dynamic requires are not currently supported by @rollup/plugin-commonjs.

Error: Dynamic requires are not currently supported by @rollup/plugin-commonjs
    at require (/Users/yhatt/Programs/marp-team/marp-cli/lib/marp-cli.js:102:8)
    at Function.silent$2 [as silent] (/Users/yhatt/Programs/marp-team/marp-cli/node_modules/import-from/index.js:8:10)
    at /Users/yhatt/Programs/marp-team/marp-cli/src/engine.ts:37:46
    at Array.some (<anonymous>)
    at Function.resolveModule (/Users/yhatt/Programs/marp-team/marp-cli/src/engine.ts:33:17)
    at /Users/yhatt/Programs/marp-team/marp-cli/src/engine.ts:23:26
    at Generator.next (<anonymous>)
    at /Users/yhatt/Programs/marp-team/marp-cli/node_modules/tslib/tslib.es6.js:74:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/yhatt/Programs/marp-team/marp-cli/node_modules/tslib/tslib.es6.js:70:12)

@yhatt
Copy link
Member

yhatt commented Jul 9, 2020

Fixed in the latest release v0.18.3. Sorry for the inconvenience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants