Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

559
Vistas
PdfMake | Error: ENOENT: no such file or directory, open './build/vfs_fonts.js'

I'm using the PDFMake library and trying to use a custom font in its output. This font is made for the Persian language. I followed the steps described on the web page below custom-fonts-client-side/vfs

I encountered the following error when executing the node build-vfs.js "./examples/fonts" command:

Internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module 'D:\ProgrammingWorld\Github_Library\Cyeng\NewProject\onGit\NewProject\build-vfs.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

So I decided to change the command and write it as follows:

node node_modules/pdfmake/build-vfs.js "node_modules\pdfmake\examples\fonts"

But unfortunately, I got a new error:

Source path: node_modules\pdfmake\examples\fonts

FILE: Shabnam-Bold.ttf
FILE: Shabnam-Light.ttf
FILE: Shabnam-Medium.ttf
FILE: Shabnam-Thin.ttf
FILE: Shabnam.ttf
internal/fs/utils.js:312
    throw err;
    ^

Error: ENOENT: no such file or directory, open './build/vfs_fonts.js'
    at Object.openSync (fs.js:498:3)
    at Object.writeFileSync (fs.js:1524:35)
    at Object.<anonymous> (D:\ProgrammingWorld\Github_Library\Cyeng\NewProject\onGit\NewProject\node_modules\pdfmake\build-vfs.js:41:4)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -4058,
  syscall: 'open',
  code: 'ENOENT',
  path: './build/vfs_fonts.js'
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Go to node_modules/pdfmake/ directory and run node build-vfs.js "./examples/fonts"

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda