I get the following when I run yo webapp from the cmd line after following http://www.youtube.com/watch?feature=player_embedded&v=zBt2g9ekiug to about 3 minutes. Has anyone seen this before?
C:\Users\L\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\cheeri
o\node_modules\entities\index.js:36
return encode[level](data);
^
ReferenceError: encode is not defined
at Object.exports.encode (C:\Users\L\AppData\Roaming\npm\node_modules\genera
tor-webapp\node_modules\cheerio\node_modules\entities\index.js:36:9)
at exports.encode (C:\Users\L\AppData\Roaming\npm\node_modules\generator-web
app\node_modules\cheerio\lib\utils.js:41:50)
at formatAttrs (C:\Users\L\AppData\Roaming\npm\node_modules\generator-webapp
\node_modules\cheerio\lib\render.js:30:32)
at renderTag (C:\Users\L\AppData\Roaming\npm\node_modules\generator-webapp\n
ode_modules\cheerio\lib\render.js:113:18)
at C:\Users\L\AppData\Roaming\npm\node_modules\generator-webapp\node_modules
\cheerio\lib\render.js:81:17
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\L\AppData\Roaming\npm\node_modules\ge
nerator-webapp\node_modules\cheerio\node_modules\underscore\underscore.js:79:11)
at module.exports (C:\Users\L\AppData\Roaming\npm\node_modules\generator-web
app\node_modules\cheerio\lib\render.js:77:5)
at Object.exports.html (C:\Users\L\AppData\Roaming\npm\node_modules\generato
r-webapp\node_modules\cheerio\lib\static.js:40:12)
at Appgenerator.domUpdate (C:\Users\L\AppData\Roaming\npm\node_modules\gener
ator-webapp\node_modules\yeoman-generator\lib\actions\wiring.js:44:14)
I had same issue when follow tutorial with latest Yomen version. There is typo error in entities library that You can manually fix to complete tutorial:
Open file with error (in your case C:\Users\L\AppData\Roaming\npm\node_modules\generator-webapp\node_modules\cheerio\node_modules\entities\index.js ) and change variable name from inverse to encode
var decode = levels.map(function(l){ return l.normal; }),
decodeStrict = levels.map(function(l){ return l.strict; }),
inverse = levels.map(function(l){ return l.inverse; });
To
var decode = levels.map(function(l){ return l.normal; }),
decodeStrict = levels.map(function(l){ return l.strict; }),
encode = levels.map(function(l){ return l.inverse; });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With