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

fail to load preprocessor #479

Closed
dvirtz opened this issue Mar 27, 2024 · 2 comments
Closed

fail to load preprocessor #479

dvirtz opened this issue Mar 27, 2024 · 2 comments

Comments

@dvirtz
Copy link
Contributor

dvirtz commented Mar 27, 2024

After upgrading to v6.0.1 it fails to load the pre-processor:

> npx reveal-md --preprocessor preprocess.js .\slides\index.md
Serving reveal.js plugin from node_modules\reveal-md\node_modules\reveal.js
Serving reveal.js dist from node_modules\reveal-md\node_modules\reveal.js
Reveal-server started at http://localhost:1949
The slides are at http://localhost:1949/index.md
node:internal/errors:477
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'preprocess.js' imported from C:\Users\dyitzchaki\github\slides\node_modules\reveal-md\lib\config.js
    at new NodeError (node:internal/errors:387:5)
    at packageResolve (node:internal/modules/esm/resolve:909:9)
    at moduleResolve (node:internal/modules/esm/resolve:958:20)
    at defaultResolve (node:internal/modules/esm/resolve:1173:11)
    at nextResolve (node:internal/modules/esm/loader:173:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:852:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:439:18)
    at ESMLoader.import (node:internal/modules/esm/loader:536:22)
    at importModuleDynamically (node:internal/modules/esm/translators:110:35)
    at importModuleDynamicallyCallback (node:internal/process/esm_loader:35:14) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.6.0
@webpro
Copy link
Owner

webpro commented Apr 12, 2024

You should use a relative path for local files e.g. --preprocessor ./preprocess.js

@webpro webpro closed this as completed in b03ed50 Apr 12, 2024
@dvirtz
Copy link
Contributor Author

dvirtz commented Apr 14, 2024

I try this from reveal-md.json but that results in

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '...\node_modules\reveal-md\lib\preprocess.js' 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants