I\'m using a gulpfile.js
generated by yeoman\'s gulp-webapp generator and modified slightly by me to fit my needs. For some reason I keep running into an issue when
Short answer: TypeError: path must be a string
means that there is an issue with the link/script paths. useref can't find the the file or directory you are pointing it to.
Long answer:
There were two issues I ran into.
<!-- build:css /styles/main.css --> <link href="app/styles/base.css"> <link href="app/styles/article.css"> <!-- endbuild -->
OR
<!-- build:css(app) /styles/main.css --> <link href="/styles/base.css"> <link href="/styles/article.css"> <!-- endbuild -->
<!-- build:css({.temp,app}) /styles/main.css --> Works
But if you only have one alt directory and you leave it in the curly braces it will throw an error.
<!-- build:css({app}) /styles/main.css --> TypeError: path must be a string
This is because it is reading the path as C:\path\to\project\{app}\styles\style.css
. This seems like odd behavior to me. I would think that it would iterate through the directories listed in the braces regardless of the length.