verbose / gulp-verb

A Gulp plugin for verb
MIT License
15 stars 4 forks source link

ReferenceError: docs is not defined #2

Closed vectorsize closed 10 years ago

vectorsize commented 10 years ago

Suddenly today I tried to use gulp docs and I got this error… However before reinstalling via npm install everything seems to work fine.

I managed to track down the problem to the verb module and some of its dependencies (didn't have the time to check them all)

for reference here is the full error:

undefined:7
((__t = ( docs("partials/_head.md") )) == null ? '' : __t) +
                                       ^
ReferenceError: docs is not defined
    at eval (eval at template (app/node_modules/gulp-verb/node_modules/lodash/dist/lodash.js:6305:22), <anonymous>:7:40)
    at Function.template (app/node_modules/gulp-verb/node_modules/lodash/dist/lodash.js:6311:16)
    at template (app/node_modules/gulp-verb/node_modules/verb/node_modules/template/index.js:36:15)
    at Cache.module.exports [as template] (app/node_modules/gulp-verb/node_modules/verb/lib/template.js:27:10)
    at Cache.verb.process (app/node_modules/gulp-verb/node_modules/verb/index.js:156:23)
    at Transform.stream._transform (app/node_modules/gulp-verb/index.js:41:23)
    at Transform._read (_stream_transform.js:179:10)
    at Transform._write (_stream_transform.js:167:12)
    at doWrite (_stream_writable.js:226:10)
    at writeOrBuffer (_stream_writable.js:216:5)

And here is a "frozen" version of the repo (npm_modules included) if you want to cross-check.

jonschlinkert commented 10 years ago

thanks for the detail! I just pushed up a new version (although the problem was a dependency). try re-installing and close this if it works for you. thanks!

nums commented 10 years ago

Hi,

I work with @vectorsize on the same lib. Thanks for your quick fix, it works great except the docs tags

gulp-verb [nomatch] · verb could not find a match for {%= docs("partials/_demo-master.md") %}

Other tags that we use like date, html are ok

jonschlinkert commented 10 years ago

hmm, strange.... actually I think I know what it is. I think the file path to the partial is built correctly. Could you maybe try looking for resolve-dep in the verb dependencies, delete it, and try doing npm i resolve-dep@0.3.5 and then try running gulp-verb again?

if that works I'll at least know where to start. thanks!

vectorsize commented 10 years ago

Cannot reproduce this error anymore, all working fine for me (even with 0.2.3) Thanks for your help @jonschlinkert ! must be a problem with @nums 's setup.

jonschlinkert commented 10 years ago

great! @nums, @doowb was telling me that he noticed an issue with file paths on one of the recent versions of node.js, it may help to just clear your cache and reinstall npm/node.js