TypeError: Object [object Object] has no method 'sourceRoot'
coxrichuk opened this issue · 10 comments
I've installed the NPM packages, but when I then try and scaffold out the boilerplate with:
yo jquery-boilerplate
I am returned:
dev@server:~/www/jqueryboilerplate/pub $ yo jquery-boilerplate
/usr/lib/node_modules/generator-jquery-boilerplate/app/index.js:7
var files = this.expandFiles('**/*', { cwd: this.sourceRoot(), dot: true }
^
TypeError: Object [object Object] has no method 'sourceRoot'
at new module.exports (/usr/lib/node_modules/generator-jquery- boilerplate/app/index.js:7:54)
at Environment.create (/usr/lib/node_modules/yo/node_modules/yeoman-generator/lib/env/index.js:325:10)
at Environment.run (/usr/lib/node_modules/yo/node_modules/yeoman-generator/lib/env/index.js:361:24)
at init (/usr/lib/node_modules/yo/bin/yo:98:7)
at pre (/usr/lib/node_modules/yo/bin/yo:110:3)
at Object.<anonymous> (/usr/lib/node_modules/yo/bin/yo:135:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
I assume it has something to do with not being able to find the sourceRoot?
I have the same issue
+1 on this issue!
Just saw this on another generator (aurelia), only after upgrading yeoman (from 1.1.x to 1.4.5), so I'm guessing Yeoman changed its api recently and broke generators...? cc @addyosmani
Thanks for the hint, got the generator-aurelia updated. For you guys here this is the new syntax: http://yeoman.io/authoring/file-system.html
Any idea on how to fix?
Sadly the only way I see is to rewrite the generator to use the new API. Had to do it for mine as well :)
Currently I'm pretty busy through a company's project. It will take several weeks.
I will do my best. For now I am going to create a branch for this rewrite(community PRs will be handy).