html - 为什么 --watch Jade 选项不起作用?

标签 html node.js pug

我从 Jade 开始,我有一个我想自动重新渲染的简单文件,

doctype html
html 
  head
    title Angular App CS

    link(rel='stylesheet' href='http://getbootstrap.com/dist/css/bootstrap.min.css')
    script(src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular.min.js')
    script(src='http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js')

我正在使用此命令 jade -w -P index.jade 但仅在第一次呈现时,当我对 .jade 进行更新时,出现以下错误出现:

TypeError: path must be a string
  at Object.fs.lstat (fs.js:675:11)
  at renderFile (/usr/lib/node_modules/jade/bin/jade.js:172:6)
  at StatWatcher.<anonymous> (/usr/lib/node_modules/jade/bin/jade.js:119:11)
  at StatWatcher.emit (events.js:98:17)
  at StatWatcher._handle.onchange (fs.js:1115:10)

会发生什么?

最佳答案

这实际上是一个错误。

参见 This Link

降级到 jade 1.8.1(npm install jade@1.8.1 -g),在错误修复之前你应该没问题。

关于html - 为什么 --watch Jade 选项不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27573129/

相关文章:

html - 在垂直中间对齐文本

javascript - 函数仅在第一次下拉选择后运行

javascript - Angular 使用 ng-include 传递变量

mysql - 关于 mysql 数据库的 NodeJS 连接 ECONNREFUSED 错误

javascript - process.getuid() 不适用于 Windows

html - 如何在外部 CSS 文件 (.css) 中设置 <html> 的 lang 全局属性

javascript - 从 Graph 获取单个消息

angularjs - Angular + Jade 的快速路由问题

javascript - 带有 NodeJS 和 Jade 的 innerHTML

node.js - app.post 不工作node.js