Cannot find module 'coffee-script' 'toml'
arturi opened this issue · 1 comments
arturi commented
Hey, thanks for the awesome package! I love that I can parse/stringify both ways with it.
I have an encountered a problem when using gray-matter with Browserify for the browser:
Error: Cannot find module 'toml' from '/.../node_modules/gray-matter/lib'
Error: Cannot find module 'coffee-script' from '/.../node_modules/gray-matter/lib'
The issue is obviously resolved when coffee-script and toml are installed. If I understand correctly, Node supports dynamic requires here, while Browserify bundles everything right away. What could be the optimal solution? Maybe moving parsers out of the module and allowing the user to require/set his own? I guess PR #15 solves this.
Thanks!
jonschlinkert commented
gray-matter was refactored, coffee is no longer built-in. see the readme to learn how to add custom engines