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.
正如官方教程所说:
除了刚刚编译的模板之外,请务必将 Pug 运行时 (node_modules/pug/runtime.js) 发送到客户端。
但实际上无法在 node_modules/pug 文件夹中找到。另外,我搜索了每个子文件夹和每个文件,仍然没有。有人可以帮忙吗?
官方文档和教程的某些部分已经有一段时间没有更新了。然而,这个问题已经在项目 GitHub 存储库中讨论过了。你可以在这里阅读它:
runtime.js 不存在。#2547
当您通过"npm i --save pug"然后在node_modules文件夹中安装 pug 时,会添加一些与 pug 相关的文件夹。那时node_modules/regenerator-runtime还添加了一个名为的文件夹。你可以runtime.js在那个文件夹里找到。
"npm i --save pug"
node_modules
node_modules/regenerator-runtime
runtime.js