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.
使用早午餐我试图在尝试要求它停止错误之前检查模块是否存在。
未捕获的错误:找不到模块“xxxxx”
if(require("filename")){ require("filename"); }
但这不起作用。
我使用了 try-catch 来阻止它出错。