bespokejs / bespoke

DIY Presentation Micro-Framework

Home Page:http://markdalgleish.com/projects/bespoke.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yeoman install with PDF export fail

Simounet opened this issue · comments

Hello,
To reproduce it, use yo bespoke and keep the default values for everything but Would you like to generate PDFs?.
Resulting in:

> install-nw

/fooproject/node_modules/install-nw/cmd.js:121
  version = [v.major, v.minor, v.patch].join('.');
              ^

TypeError: Cannot read property 'major' of null
    at down (/fooproject/node_modules/install-nw/cmd.js:121:15)
    at init (/fooproject/node_modules/install-nw/cmd.js:72:11)
    at Object.<anonymous> (/fooproject/node_modules/install-nw/cmd.js:41:10)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
npm WARN presentation-hello-world@0.0.0 No repository field.
npm WARN presentation-hello-world@0.0.0 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nw-shot@4.2.0 postinstall: `install-nw`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nw-shot@4.2.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I fix that with this trick (adding "nw" : "0.12.3" to the root of my package.json and doing an npm install). Still, launching gulp pdf results in:

[19:07:38] RangeError: Invalid array length
    at module.exports (/fooproject/node_modules/bespoke-to-pdf/index.js:43:18)
    at module.exports (/fooproject/node_modules/bespoke-pdf/index.js:13:10)
    at Gulp.<anonymous> (/fooproject/gulpfile.js:64:10)
    at module.exports (/fooproject/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/fooproject/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/fooproject/node_modules/orchestrator/index.js:214:10)
    at /fooproject/node_modules/orchestrator/index.js:279:18
    at finish (/fooproject/node_modules/orchestrator/lib/runTask.js:21:8)
    at module.exports (/fooproject/node_modules/orchestrator/lib/runTask.js:60:3)
    at Gulp.Orchestrator._runTask (/fooproject/node_modules/orchestrator/index.js:273:3)fooproject

node@6.9.1
npm@5.3.0

This has been addressed by the v3 proposal of the generator. See bespokejs/generator-bespoke#38. It just needs to be merged.

It seems to be great but no activity since Jul 4, 2016 so can we expect to be merged on day?

The new generator is now available.

See https://www.npmjs.com/package/generator-bespoke

The preferred method for creating a PDF is print styles (print to PDF in Chrome). It's the only reliable way to make a PDF that looks like the presentation, IMO.

The print styles are not yet part of the generator. You can find them here: https://github.com/opendevise/presentation-bespoke-starter/blob/master/src/styles/print.styl