Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
客户端的 Jade 继承给我这个错误:
Error: failed to require "path"
有什么解决办法吗?
还是可以在客户端使用继承?
您正在代码中的某处使用路径,如下所示
app.use(express.static(path.join(__dirname, 'public')));
所以你应该像这样添加路径模块:
var express = require('express') , path = require('path');