Closed victorteokw closed 9 years ago
I've got the same error here: error: Cannot parse Coffee file /path/hey/plop/blabla.coffee: node is not defined
I'm on Windows 7.
Same error here as well
I'm using: codo v2.0.9 OS X 10.10.2 node.js v0.10.21 CoffeeScript version 1.9.0
I was getting this too when Codo's internal CoffeeScript dependency was 1.9. I manually uninstalled it and had it use a 1.8 (higher up node_modules), and it worked fine then.
I don't really know why but my problem auto-solved...
I uninstalled coffee-script then re-installed coffee-script 1.8 (npm install coffee-script@1.8.0
) and codo.
Later, I rolled back to 1.9.0
but it's still working... so I'm confused.
It still happens when using coffee1.8.0
codo uses its own coffee-script folder in codo/node_modules. So the simplest workaround until this is resolved seems to be (at least it worked for me):
/usr/local/lib/node_modules/codo
edit package.json
so that it has
"dependencies": {
"coffee-script": "= 1.8.0",
Now install coffeescript 1.8.0 for codo only
rm -fr node_modules/coffee-script
npm install
Note: The code to document should not use coffeescript 1.9.0 features
The fix seems to be fairly simple: codo/lib/entities/method.coffee line 9 and 10 are:
9 constructor: (@environment, @file, @node) ->
10 @name = [node.variable.base.value]
but should be
9 constructor: (@environment, @file, @node) ->
10 @name = [@node.variable.base.value]
Just add the @ in line 10 in front of node.
I had this issue, and using the latest version from github fixes it for me. Tip: to get the latest version from github into your package.json until the fixes are released, just use:
"codo": "coffeedoc/codo",
Nice work folks. Would you mind publishing this update to npm? Thanks!
2.0.11 released
I've tried several versions, neither works. The most recent version (2.0.8 and 2.0.9) generates this error.