javascript - TypeError: Cannot read property 'sortingLevel' of undefined -
sample brunch session:
$ npm -v 1.2.25 $ brunch -v 1.7.6 $ bower -v 1.2.7 $ brunch new https://github.com/monokrome/brunch-with-grits.git example ... $ cd example $ ls app bower_components bower.json config.coffee node_modules package.json readme.md vendor $ ls bower_components/ backbone backbone.babysitter backbone.marionette.subrouter backbone.wreqr jquery lodash marionette underscore $ brunch build 06 oct 22:25:49 - info: compiled 9 files 3 files, copied index.html in 761ms $ bower install -s https://github.com/whyohwhyamihere/backbone.marionette.subrouter.git ... $ grep marionette bower.json "marionette": "~1.0.4", "backbone.marionette.subrouter": "https://github.com/whyohwhyamihere/backbone.marionette.subrouter.git" "marionette": { "main": "lib/core/backbone.marionette.js" $ cp bower.json bower.json.orig $ vi bower.json ... $ diff bower.json bower.json.orig 47,52d46 < }, < "backbone.marionette.subrouter": { < "main": "backbone.marionette.subrouter.js", < "dependencies": { < "marionette": "*" < } $ brunch build /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:164 var level = math.max(pkg.sortinglevel || 0, initial); ^ typeerror: cannot read property 'sortinglevel' of undefined @ setlevel (/home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:164:29) @ /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:169:7 @ array.foreach (native) @ setlevel (/home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:168:10) @ array.foreach (native) @ setsortinglevels (/home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:175:12) @ sortpackages (/home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:181:10) @ /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:211:20 @ /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:144:7 @ /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/async-each/index.js:24:44 @ /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:101:7 @ /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/read-components/index.js:49:7 @ fs.js:253:14 @ /home/icyrockcom/nvm/v0.11.3/lib/node_modules/brunch/node_modules/init-skeleton/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js:103:5 @ object.oncomplete (fs.js:94:15)
any ideas why doesn't work? marionette
dependency included, should not fail.
i ran same issue, , turned out had brunch
installed globally , locally. aka, installed npm install -g brunch
, had defined in package.json
.
remove package.json
(or uninstall globally) , try again.
Comments
Post a Comment