Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in prettify.js - Cannot set property console of #<Object> which has only a getter #20

Open
ghost opened this issue Feb 7, 2011 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 7, 2011

When I try to run howtonode.org (using spark in the directory that has app.js) after installing wheat 0.1.5 using npm (running node v0.4.0-pre), I get the following error

node.js:116
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot set property console of # which has only a getter
at Object. (/home/dev/local/lib/node/.npm/wheat/0.1.5/package/lib/wheat/prettify.js:62:20)
at Module._compile (module.js:302:26)
at Object..js (module.js:308:10)
at Module.load (module.js:234:31)
at Function._load (module.js:201:10)
at require (module.js:246:19)
at Object. (/home/dev/local/lib/node/.npm/wheat/0.1.5/package/lib/wheat/renderers.js:5:16)
at Module._compile (module.js:302:26)
at Object..js (module.js:308:10)
at Module.load (module.js:234:31)

The line it's referring to is

window.console = console;

Any ideas?

Node & NPM were installed using this method (and therefore live in ~/local) if it makes any difference - https://gist.github.com/579814#file_only_git_all_the_way.sh

@bdarcus
Copy link

bdarcus commented Feb 7, 2011

Ditto here.

@TooTallNate
Copy link
Contributor

Change the line slightly above in prettify.js from:

window = GLOBAL;

to:

window = this;

I'm preparing a patch, but I think this is an external library of some sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants