Node.js-require未定义异常 [英] Node.js - require is not defined exception
本文介绍了Node.js-require未定义异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是一个完全的Node.js新手,并且在基础方面苦苦挣扎.在服务器上运行以下代码:
I am a complete Node.js newbie and struggling with the basics. Running this code on the server:
var http = require("http"),
sys = require("util"),
io = require("socket.io"),
GlobTrie = require("glob-trie.js");
首先给我一个例外:
Uncaught ReferenceError: require is not defined
(anonymous function)
有什么想法吗?
最诚挚的问候,本.
推荐答案
案例已关闭,我在客户端包含了错误的文件!
Case closed, I was including the wrong file on the client!
很抱歉浪费人们的时间,但是感谢Node链接.
Sorry to waste people time, but thanks for the Node links.
这篇关于Node.js-require未定义异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文