watch fails when installing packages #479

Closed
icholy opened this Issue Jan 28, 2013 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

icholy commented Jan 28, 2013

Version: 1.5.2
OS: Ubuntu 12.04 32bit

$ brunch new foo -s git://github.com/paulmillr/brunch-with-chaplin.git
$ cd foo
$ npm install

everything works fine

$ brunch watch --server
28 Jan 13:55:48 - info: application started on http://localhost:3333/
28 Jan 13:55:49 - info: compiled in 751ms

edit & save package.json

28 Jan 13:55:54 - info: Installing packages...

/usr/local/lib/node_modules/brunch/lib/helpers.js:402
    paths.config = configPath != null ? configPath : joinRoot('config');
                 ^
TypeError: Cannot assign to read only property 'config' of #<Object>
    at exports.setConfigDefaults.setConfigDefaults (/usr/local/lib/node_modules/brunch/lib/helpers.js:402:18)
    at Object.exports.loadConfig (/usr/local/lib/node_modules/brunch/lib/helpers.js:506:5)
    at initialize (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:166:24)
    at Object.exports.loadPackages (/usr/local/lib/node_modules/brunch/lib/helpers.js:539:12)
    at initialize (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:161:20)
    at new BrunchWatcher (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:247:7)
    at module.exports.watch (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:282:12)
    at reWatch (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:150:16)
    at exports.install.install (/usr/local/lib/node_modules/brunch/lib/helpers.js:175:14)
    at ChildProcess.exithandler (child_process.js:534:7)

Same problem here.
Ubuntu 12.10, nvm, node 0.8.14

Contributor

icholy commented Feb 1, 2013

#337 looks like it's related

Contributor

icholy commented Feb 1, 2013

I ended looking around a bit and if you don't freeze the config object then the problem goes away.
That doesn't really make sense to me because from what I can see, it should be a new object the second time around.

https://github.com/brunch/brunch/blob/master/src/helpers.coffee#L405

paulmillr closed this in 8f5f90f Apr 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment