Skip to content

Error: unexpected top-level await at node_modules/ttf2woff2/dist/index.js:9 #87

Description

@timint

Error: unexpected top-level await at node_modules/ttf2woff2/dist/index.js:9

ttf2woff2 = (await import('bindings')).default('addon.node').convert;

Using Node v23.1.0. This package version 5 came as a dependency from gulp-iconfont. I tried upgrading to image2woff2 6.0.1 but the error remains.

From my gulpfile.mjs:

import iconfont from 'gulp-iconfont';

I also tried this without luck:

import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);

const iconfont = require('gulp-iconfont');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions