Not included into executable at compilation stage. Please recompile adding it as asset or script.

See original GitHub issue

Not too sure on this one, My package.json includes as shown -

 "pkg": {
   "scripts": [
   ],
   "assets": [
     "node_modules/figlet/**/*.*",
     "node_modules/figlet/fonts/Standard.flf"
   ]
 }

This is displayed when I try to run app-win.exe

(node:28040) UnhandledPromiseRejectionWarning: Error: File 'C:\**\MiWatchKleaner2.0\node_modules\figlet\fonts\Standard.flf' was not included into executable at compilation stage. Please recompile adding it as asset or script.
    at error_ENOENT (pkg/prelude/bootstrap.js:426:17)
    at readFileFromSnapshot (pkg/prelude/bootstrap.js:654:29)
    at Object.fs.readFileSync (pkg/prelude/bootstrap.js:698:18)
    at Function.loadFontSync (C:\snapshot\MiWatchKleaner2.0\node_modules\figlet\lib\node-figlet.js:48:23)
    at Function.textSync (C:\snapshot\MiWatchKleaner2.0\node_modules\figlet\lib\figlet.js:732:43)
    at Object.header (C:\snapshot\MiWatchKleaner2.0\lib\common.js)
    at Object.mainMenu (C:\snapshot\MiWatchKleaner2.0\pages\pages.js)
    at Object.<anonymous> (C:\snapshot\MiWatchKleaner2.0\app.js)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
(node:28040) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:28040) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
karl0sscommented, Sep 3, 2020

I seemed to fix this by specifying the file explicitly that I neeed…

 "pkg": {
    "scripts": [],
    "assets": [
      "node_modules/figlet/fonts/Standard.flf",
      "data/xiaomiPackageRemovalList.json"
    ],
    "targets": [
      "node12-linux-x64",
      "node12-macos-x64",
      "node12-win-x86"
    ]
  }
0reactions
github-actions[bot]commented, May 28, 2021

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js vercel/pkg express 'return 0 error' and fastify errors ...
... '/**/express/views/index.html' was not included into executable at compilation stage. Please recompile adding it as asset or script. at ...
Read more >
index.html not included in package error while running the ...
html' was not included into executable at compilation stage. Please recompile adding it as asset or script. at error_ENOENT (pkg/prelude/ ...
Read more >
pkg - npm
This command line interface enables you to package your Node.js project into an executable that can be run even on devices without Node.js ......
Read more >
Compiling a Node.js Application into an .exe File - Section.io
Compiling Node.js files into an executable file for various operating ... Please recompile adding it as asset or script. at error_ENOENT ...
Read more >
Vercel's pkg - Package your Node.js app into a single ...
Hello all, In this short post, we will take a look at Vercel's pkg - how we can package the Node.js app into...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found