node.js - Gulp Fontello 使用 adm-zip 出错,最近的现象
问题描述
我在 gulp 构建脚本中使用 gulp-fontello。它已经工作了很多年,直到最近我在运行 fontello 任务时遇到了这个错误:
Error: Invalid filename
at new module.exports (F:\Websites\olivebranch\wp-content\themes\wpx\assets\node_modules\adm-zip\adm-zip.js:22:10)
at processResponse (F:\Websites\olivebranch\wp-content\themes\wpx\assets\node_modules\gulp-fontello\lib\index.js:37:15)
at F:\Websites\olivebranch\wp-content\themes\wpx\assets\node_modules\gulp-fontello\lib\index.js:88:11
at done (F:\Websites\olivebranch\wp-content\themes\wpx\assets\node_modules\needle\lib\needle.js:460:14)
at PassThrough.<anonymous> (F:\Websites\olivebranch\wp-content\themes\wpx\assets\node_modules\needle\lib\needle.js:711:9)
at PassThrough.emit (events.js:182:13)
at PassThrough.EventEmitter.emit (domain.js:459:23)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
[11:22:12] 'fontello' errored after 592 ms
我有几十个不同的安装使用这个任务。起初我认为节点发生了一些变化(也许是新版本的 adm-zip?),但事实证明我所有的旧安装也都失败了。在过去几周内未运行 npm install 的较旧安装:
Error: Invalid filename
at formatError (C:\Users\Daniel Quinn\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\format-error.js:20:10)
at Gulp.<anonymous> (C:\Users\Daniel Quinn\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\log\events.js:31:15)
at Gulp.emit (events.js:187:15)
at Gulp.EventEmitter.emit (domain.js:441:20)
at Object.error (F:\Websites\osrplus\wp-content\themes\corscova\assets\node_modules\undertaker\lib\helpers\createExtensions.js:61:10)
at handler (F:\Websites\osrplus\wp-content\themes\corscova\assets\node_modules\now-and-later\lib\mapSeries.js:47:14)
at f (F:\Websites\osrplus\wp-content\themes\corscova\assets\node_modules\once\once.js:25:25)
at f (F:\Websites\osrplus\wp-content\themes\corscova\assets\node_modules\once\once.js:25:25)
at tryCatch (F:\Websites\osrplus\wp-content\themes\corscova\assets\node_modules\async-done\index.js:24:15)
at done (F:\Websites\osrplus\wp-content\themes\corscova\assets\node_modules\async-done\index.js:40:12)
Fontello 内部的文件名似乎发生了变化?
解决方案
尝试升级 gulp-fontello 版本 0.5.2。
或将此添加到您的 package.json
"gulp-fontello": "^0.5.2",
推荐阅读
- html - 如何使用 Jquery 进行验证 - 使用 .netcore
- php - symfony 和 docker 之间的链接
- flutter - 在 null 上调用了 getter 'length'。接收者:空尝试呼叫:长度(感谢谁帮助我)
- javascript - 对象的 React-Native Child 返回 undefined 尽管它存在
- python-3.x - 这个术语是什么意思,代码中的问题在哪里?
- python - 无法在 M1 Mac 上使用 pip3 安装 psycopg2
- android - 时间触发器不起作用。手动它工作
- ios - 苹果:应用程序请求用户同意访问该位置,但没有充分解释该位置的使用
- javascript - messageReaction 中的 activity.from 对象中缺少名称属性
- java - 是否有一种算法或函数可以在给定 n 个数值的情况下输出随机数?