NPM : Unexpected end of JSON input while parsing near

I got this error when trying to install npm-check-updates with npm 5.6.0 on node 8.1.1

The solution is simple, just invoke

npm cache clean --force

try install npm-check-updates again, voila! it works



Pug render variable twice

recently, I want to pass this variable to the view

passedVars.metaOgUrl = '<meta property="og:url" content="' + originalUrl + '">';

and use the usual way of rendering variable in pug


but it render the tag twice, a simple googling then found the answer, use != character as prefix


it’s rendered normal now