Skip to content

Conversation

davidharting
Copy link

When using metalsmith-layouts using the handlebars engine and with handlebars installed, I get this error:

Error: no files to process. See https://www.npmjs.com/package/metalsmith-layouts#no-files-to-process
    at Ware.<anonymous> (/Users/davidharting/repos/metalsmith-trial/node_modules/metalsmith-layouts/lib/index.js:141:7)
    at Ware.<anonymous> (/Users/davidharting/repos/metalsmith-trial/node_modules/wrap-fn/index.js:45:19)
    at Immediate.next (/Users/davidharting/repos/metalsmith-trial/node_modules/ware/lib/index.js:85:20)
    at Immediate._onImmediate (/Users/davidharting/repos/metalsmith-trial/node_modules/wrap-fn/index.js:121:18)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)

The metalsmith-layouts docs indicate that you should install jstransformer-handlebars instead of regular handlebars.

Installing jstransformer-handlebars solved my issue and I can build using handlebars layouts. I uninstalled handlebars and continue to have good builds.

When using `metalsmith-layouts` using the handlebars engine and with `handlebars` installed, I get this error:

```
Error: no files to process. See https://www.npmjs.com/package/metalsmith-layouts#no-files-to-process
    at Ware.<anonymous> (/Users/davidharting/repos/metalsmith-trial/node_modules/metalsmith-layouts/lib/index.js:141:7)
    at Ware.<anonymous> (/Users/davidharting/repos/metalsmith-trial/node_modules/wrap-fn/index.js:45:19)
    at Immediate.next (/Users/davidharting/repos/metalsmith-trial/node_modules/ware/lib/index.js:85:20)
    at Immediate._onImmediate (/Users/davidharting/repos/metalsmith-trial/node_modules/wrap-fn/index.js:121:18)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
```

The [`metalsmith-layouts` docs](https://github.com/metalsmith/metalsmith-layouts#example) indicate that you should install `jstransformer-handlebars` instead of regular `handlebars`.

Installing `jstransformer-handlebars` solved my issue and I can build using handlebars layouts. I uninstalled `handlebars` and continue to have good builds.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.875% when pulling 8602e43 on davidharting:patch-1 into 8eacefc on segmentio:master.

@davidharting
Copy link
Author

Closing in favor of #320

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

Successfully merging this pull request may close these issues.

2 participants