Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

524
Visualizações
How to add missing package to exe file in Javascript with pkg

I am developing a program to send messages by whatsapp through whatsapp-web.js module, I want to make my program an executable, for this I am using "pkg", however when I generate the executable, I get the following message.

Warning Cannot include directory %1 into executable.
The directory must be distributed with executable as %2.
%1: ..\node_modules\puppeteer\.local-chromium
%2: path-to-executable/puppeteer

I already copied the path where it is requested, here you can see it in vscode

enter image description here

However, when I run the executable I get this:

C:\snapshot\romer\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:105
            throw new Error(missingText);
                  ^

Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (982053).
    at ChromeLauncher.launch (C:\snapshot\romer\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:105:23)
    at PuppeteerNode.launch (C:\snapshot\romer\node_modules\puppeteer\lib\cjs\puppeteer\node\Puppeteer.js:125:31)
    at Client.initialize (C:\snapshot\romer\node_modules\whatsapp-web.js\src\Client.js:95:39)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at process.runNextTicks [as _tickCallback] (node:internal/process/task_queues:65:3)
    at Function.runMain (pkg/prelude/bootstrap.js:1941:13)
    at node:internal/main/run_main_module:17:47

Does anyone know how to solve this error? I have searched in forums but I have not seen anything that helps me, my code in Github: https://github.com/rromerov/Whatsapp-Web-Project/blob/main/codigo.js

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda