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

problem compiling #325

Closed
pgte opened this issue Aug 17, 2014 · 2 comments
Closed

problem compiling #325

pgte opened this issue Aug 17, 2014 · 2 comments

Comments

@pgte
Copy link

pgte commented Aug 17, 2014

Thanks for harp, it's awesome!
One problem I can't seam to work around though:

When running the server I get no error.

When compiling I get this error:

 node_modules/.bin/harp compile .
{
  "source": "Jade",
  "dest": "HTML",
  "filename": "/Users/pedroteixeira/projects/nodetuts-www/node_modules/harp/lib/templates/_layout.jade",
  "lineno": 129,
  "name": "TypeError",
  "message": "Cannot read property 'version' of undefined",
  "stack": "doctype\nhtml(lang=\"en\")\n\thead\n\t\tmeta(charset=\"utf-8\")\n\t\tmeta(http-equiv=\"X-UA-Compatible\", content=\"IE=edge,chrome=1\")\n\t\t//- title #{ pkg.name } #{ pkg.version }\n\t\ttitle Harp\n\t\tmeta(name=\"handheldfriendly\", content=\"true\")\n\t\tmeta(name=\"mobileoptimized\", content=\"320\")\n\t\tmeta(name=\"viewport\", content=\"width=device-width, initial-scale=1.0\")\n\t\tmeta(http-equiv=\"cleartype\", content=\"on\")\n\t\tstyle.\n\t\t\tbody {\n\t\t\t\tfont-family: Verdana;\n\t\t\t\tpadding:10px 10px;\n\t\t\t}\n\n\t\t\th1, h2, h3, h4, h5, h6{\n\t\t\t\tfont-weight: 300;\n\t\t\t\tline-height: 1.5em;\n\t\t\t}\n\n\t\t\th3 {\n\t\t\t\tfont-weight: 500;\n\t\t\t\tfont-size: 1em;\n\t\t\t}\n\n\t\t\tp {\n\t\t\t\tfont-size: 1em;\n\t\t\t\tline-height: 1.5em;\n\t\t\t}\n\n\t\t\theader{\n\t\t\t\tpadding:20px 0px;\n\t\t\t}\n\n\t\t\theader h1{\n\t\t\t\tmargin:0;\n\t\t\t}\n\n\t\t\theader h3{\n\t\t\t\tmargin:0;\n\t\t\t}\n\n\t\t\t.stacktrace{\n\t\t\t\tpadding:0px;\n\t\t\t\tmargin-bottom:20px;\n\t\t\t\tmargin-top:40px;\n\t\t\t\tborder:2px solid #a44;\n\t\t\t\tbackground:#a44;\n\t\t\t}\n\n\t\t\t.stacktrace h3{\n\t\t\t\tpadding:22px 0px 20px 10px;\n\t\t\t\tcolor: #fff;\n\t\t\t\tmargin:0px;\n\t\t\t\tfont-size:0.75em;\n\t\t\t\tline-height:1em;\n\t\t\t\tfont-weight:600;\n\t\t\t\toverflow:auto;\n\t\t\t}\n\n\t\t\tpre {\n\t\t\t\tpadding: 20px 0px;\n\t\t\t\tmargin:0;\n\t\t\t\tbackground:#f8f8f8;\n\t\t\t\twidth:100%;\n\t\t\t\toverflow:auto;\n\t\t\t}\n\n\t\t\tcode{\n\t\t\t\tline-height: 1.5em;\n\t\t\t\tfont-size: 1em;\n\t\t\t}\n\n\t\t\tfooter{\n\t\t\t\tbackground: #f8f8f8;\n\t\t\t\tpadding:20px 0px 20px 20px;\n\t\t\t\tborder-top:2px solid #eee;\n\t\t\t}\n\n\t\t\t.version{\n\t\t\t\tbackground: #6b919e;\n\t\t\t\tpadding: 2px 6px;\n\t\t\t\tborder-radius: 3px;\n\t\t\t\tcolor:#FFF;\n\t\t\t\tfont-weight: 300;\n\t\t\t}\n\n\t\t\tul.projects {\n\t\t\t\tpadding: 0;\n\t\t\t}\n\n\t\t\tul.projects li{\n\t\t\t\tlist-style-type:none;\n\t\t\t\tmargin-bottom:10px;\n\t\t\t}\n\n\t\t\tul.projects li a{\n\t\t\t\tbackground: #eee;\n\t\t\t\tpadding:25px 0px 25px 20px;\n\t\t\t\tborder-left: 4px solid #6b919e;\n\t\t\t\tdisplay:block;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\ttext-decoration:none;\n\t\t\t}\n\n\t\t\tul.projects li a h2{\n\t\t\t\tfont-weight:bold;\n\t\t\t\tcolor: #6b919e;\n\t\t\t\tmargin:0px;\n\t\t\t}\n\n\t\t\tul.projects li a code{\n\t\t\t\tmargin:0px;\n\t\t\t\tcolor:#666;\n\t\t\t\ttext-decoration:none;\n\t\t\t}\n\n\t\t\t.center {\n\t\t\t\ttext-align:center;\n\t\t\t\tpadding-top: 100px;\n\t\t\t\tpadding-bottom: 100px;\n\t\t\t}\n\n\tbody\n\t\t!= yield\n\t\tfooter\n\t\t\tp Harp <span class=\"version\">v#{ pkg.version }</span> &nbsp;\n\t\t\t\ta(href=\"http://harpjs.com/docs/\", target=\"_blank\") Documentation\n"
}

This last stack part is unfamiliar to me, I don't recognize the markup, looks like a hard internal thing (docs).

Any clues?

@pgte
Copy link
Author

pgte commented Aug 17, 2014

Nevermind, just realized it was trying to compile node_modules.

@pgte pgte closed this as completed Aug 17, 2014
@kennethormandy
Copy link
Collaborator

Thanks for letting us know! Hopefully #275 or #312 will take care of that in the future.

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