运行Node.js@0.8.15 + Express@3.0.4 + Jade@0.27.7 + Stylus@0.31.0。由于某种原因,得到以下错误。有人知道这是什么意思吗?
我不认为我在做什么奇怪的事。这是在我做的时候发生的:res.render(view, response);
Property 'visitFunction' of object #<Object> is not a function
at Object.Compiler.visitNode (/app/node_modules/jade/lib/compiler.js:176:32
我该如何处理这个问题?我的jade文件是:
extends layout
block content
h1.
User List
ul
each user, i in userlist
li
a(href="mailto:#{user.email}")= user.username
我得到以下错误:
TypeError: C:\node\nodetest1\views\userlist.jade:7
5| User List
6| u
自从我从WebStorm 6更新到7后,我看到了这个Jade错误。Jade版本是0.35。
这是路由:
exports.index = function (req, res) {
var model = // get collection;
res.render('index', {data: model});
};
我在WebStorm 7的index.jade中看到的Jade编译错误
C:\Docs\Source\Projects\unicorn\src\node_modules\jade\bin\jade:163
throw e
我使用带有普通超文本标记语言模板的ExpressJS (没有Jade或类似的模板引擎)。由于我要将MongoDB添加到我的应用程序中,因此需要将数据注入到我的HTML文件中。我知道当我使用Jade或类似的模板引擎时,这是没有问题的。有没有可能不使用Jade就直接把它注入到我的HTML文件中?如果没有,是否可以在使用Jade的同时保留我的HTML文件?
这是我的app.js:
var express = require('express');
var server = express.createServer();
server.configure(function () {
我从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='h
我将Jade作为模板引擎与Express/node.js一起运行,每当我在.jade文件中遇到语法错误时,我都会得到这样的报告:
at new JS_Parse_Error (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:196:18)
at js_error (/home/hoylemd/code/Javascript/nodejs/simplewebsite/node_modules/jade
所以我有一个使用Express.js和Jade的项目。在Node.js应用程序中,我使用了一些Jade片段来创建HTML。
示例:
var jade = require('jade');
var jadeStr = jade.compile('<h1 class="#{ var.class }">var.heading</h1>');
var jadeObj = { class: "heading", heading: "Example heading text."};
var html
我是Node/Express的新手,我有一个关于路由的基本问题,因为我收到了以下错误消息:
app.use('/edu', edu);
^
ReferenceError: edu is not defined
at Object.<anonymous> (/Users/ronitelman/Dropbox/happy/happy/app.js:29:17)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
我正在尝试运行sparkleshare-dashboard,这是一个开源的工具。到目前为止,我收到了很多错误,因为我对其中使用的技术一无所知。所以,这一次,当我从命令提示符使用节点命令运行app.js时,我得到了这个错误。
Warning: missing space before text for line 20 of jade file "D:\Imports\sparkles
hare-dashboard/views/createFirstUser.jade"
Error: D:\Imports\sparkleshare-dashboard/views/c
当我使用以下命令创建新包时,NodeJS.express出现问题:
express test_web
创建成功,但当我打开localhost:3000主页时,它无法访问parse方法!
这是一整页的内容:
Express
500 TypeError: /Users/user/Documents/p/hello_test/views/index.jade:5 3| block content 4| h1= title > 5| p Welcome to #{title} Object #<Object> has no method 'parse'
at dete
我有一些传入Node.js的JSON,我试图解析它并在页面上显示它。但是,在对堆栈溢出进行搜索并尝试各种解决方案(目前正在阅读)之后,我将收到以下错误:
TypeError: D:\Programming\node\yale\views\index.jade:10
8| //- p= post.comments[1].data
9| each comment in post.comments
> 10| each text in comment.data
11|
我目前正在使用gulpfile.js,我正在为如何在我的gulpfile.js中设置Jade包而奋斗。(为了澄清这一点,我在这里指的是)下面是我的gulpfile.js中的代码
var gulp = require('gulp');
var browserSync = require('browser-sync');
var sass = require('gulp-sass');
var uglify = require('gulp-uglify');
var jade =
当我加载我的Express网页时,我会得到以下错误:
表示500错误:/app/view/index.jder:114 112\ td 2 113\ td 4年>114倍输入是自闭的,不应该有内容。
112| td 2
113| td 4 years
> 114|
input is self closing and should not have content.
at Object.Compiler.visitTag (/app/node_modules/jade/lib/compiler.js:434:15)
at Object.Compiler.visitNode (/app
当我想从我的翡翠模板生成一个带有翡翠- PDF -红线的pdf时,我有以下错误:
TypeError: Cannot read property 'length' of undefined on line 12
at eval (eval at <anonymous> (/var/www/html/BP_webApp/node_modules/jade-pdf-redline/node_modules/jade/lib/jade.js:160:8), <anonymous>:62:26)
at res (/var/www/html/BP_webApp/n
我安装了jade (npm install jade),并访问了他们的github页面获取了一些示例。这是我想要执行的:
code.jade:
- var title = "Things"
h1= title
ul#users
- each user, name in users
- if (user.isA == "ferret")
li(class: 'user-' + name) #{name} is just a ferret
- else
li(class: 'user-' +
我正在为我的移动应用程序构建一个nodejs服务器,当我保存数据时遇到了一个问题,我可以在我的data.jade中显示它
下面是我的错误消息:
Cannot read property '0' of undefined
at jade_debug.unshift.lineno (eval at <anonymous> (/Users/****/Documents/Node- server/node_modules/jade/lib/jade.js:160:8), <anonymous>:33:21)
at eval (eval at <
这是localhost上的kue ui中的错误:6379/active在我的web浏览器.中
TypeError:
E:\development\workspace\wmtservices\node_modules\kue\lib\http\views\_filter.jade:3
1| select#filter
2| option(value='') filter by
> 3| - each type in types
4| option(value=type)= type
Cannot read property 'length'
我有一个Node.js express web应用程序。
layout.jade看起来像这样
doctype html
html
head
title= title
link(rel='stylesheet', href='/stylesheets/style.css')
block extraHeader
body
block content
我的map.jade看起来像这样:
extends layout
block extraHeader
link(rel='stylesheet' href=
我正在运行一个Express应用程序,并且我正在获得一个JS_Parse_Error。我想不出为什么。我基本上已经注释掉了我写的所有新代码,但我仍然收到错误。有没有办法找出哪个Javascript代码行给了我这个错误?
Error
at new JS_Parse_Error (/home/charlie/Projects/chat/node_modules/jade/node_modules/with/node_modules/uglify-js/lib/parse.js:196:18)
at js_error (/home/charlie/Projects/chat/node
我正在沿着节点的路径(遵循教程)开始我的旅程,并编写了下面的jade文件
extends layout
block content
h1= title
form( method="post")
div
div
span Title :
input(type="text", name="title", id="editArticleTitle")
div
span Body :
textarea(name="body