Giter Club home page Giter Club logo

nicon's Issues

api/repo/:id/sync接口运行报错

我在linux上部署测试了下,这个接口运行总是失败,原因可能是在下面这个方法中

gulp运行的最后一步没有触发,导致超时。看了下,在生成字体的时候只生成了后缀为svg和ttf的fonts文件,eot和woff的生成失败了,请教下肯能的原因是什么呢?

on('finish', function () {
       console.log('font generation over');
});
// server/tool/icon.js
compileIcon (iconPrefix, fontPath, svgPath, templatePath, repoPath) {
        return new Promise((resolve, reject) => {
            gulp.src([svgPath])
                .pipe(iconfont({
                    fontName: iconPrefix,
                    // prependUnicode: true,
                    // startUnicode: 0xE001,
                    formats: ['svg', 'ttf', 'eot', 'woff'],
                    // 'eot', 'woff'格式生成有问题
                    // formats: ['svg', 'ttf'],
                    normalize: true,
                    centerHorizontally: true,
                    fontHeight: 1024 // must need for perfect icon
                }))
                .on('glyphs', function (glyphs, options) {
                    glyphs.forEach(function (glyph, idx, arr) {
                        arr[idx].codePoint = glyph.unicode[0].charCodeAt(0).toString(16).toUpperCase()
                    });
                    gulp.src(path.join(templatePath, './iconTemplate.css'))
                        .pipe(consolidate('lodash', {
                            glyphs: glyphs,
                            fontName: iconPrefix,
                            fontPath: '../fonts/',
                            cssClass: iconPrefix
                        }))
                        // css 给demo文件用
                        .pipe(rename('icons.css'))
                        .pipe(rev())
                        .pipe(gulp.dest(path.join(repoPath, './css/')))
                        .on('finish', function () {
                            console.log('css file generation over!');
                            resolve();
                        })
                })
                .pipe(rev())
                .pipe(gulp.dest(path.join(repoPath, './fonts/')))
                .on('finish', function () {
                    console.log('font generation over');
                });
        })
    }

koa服务启动时候 总报mongodb的错

0|iconServ | [D] [2022-06-29 11:02:15.456] - connect redis success
0|iconServ | [D] [2022-06-29 11:02:15.490] - disconnect mongodb, dbUrl: mongodb://mongoadmin:[email protected]:27017/iconRepo, reason: undefined
PM2 | App [iconServer] with id [0] and pid [71649], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:iconServer id:0
PM2 | App name:iconServer id:0 online
0|iconServ | Wed, 29 Jun 2022 03:02:15 GMT koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/blob/master/docs/migration.md at index.js:93:9

帮忙看下,这个是什么原因,是因为mongodb 不对吗,还是koa版本不对

上传图标报错

您好,之前版本低的问题,我自己升级解决了,现在启动后,上传图标报错。尝试了半天,感觉不是文件夹权限的问题。
[E] [2022-07-07 01:17:43.594] - TypeError: Cannot read properties of undefined (reading 'file')
at IconDraftController.saveDraftIcon (/Users/front4/code/nicon-master/server/controller/iconDraftController.js:49:39)
at /Users/front4/code/nicon-master/server/router/iconDraftRouter.js:31:34
at dispatch (/Users/front4/code/nicon-master/node_modules/koa-compose/index.js:42:32)
at /Users/front4/code/nicon-master/server/middleware/auth.js:13:19
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async /Users/front4/code/nicon-master/node_modules/koa-session2/index.js:32:9
at async serve (/Users/front4/code/nicon-master/node_modules/koa-static/index.js:53:9)
at async bodyParser (/Users/front4/code/nicon-master/node_modules/koa-bodyparser/index.js:82:48)
at async /Users/front4/code/nicon-master/index.js:83:9
at async /Users/front4/code/nicon-master/index.js:50:28

我从淘宝iconfont上下载的svg 生成字体库的时候 svgo处理过的svg bug

环境windos10 我从淘宝iconfont上下载的svg 生成字体库的时候 svgo处理过的svg 进行 gulp-iconfont 处理的时候 有的图标 直接Streaming not supported 我发现淘宝上的svg path里的 比如 1 1 0 会被svgo处理成110 gulp-iconfont glyphs 就处理不了 不识别 有的svg是可以的 还在排查原因

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.