Pkg: node_modules/figlet/fonts/Standard.flf' was not included into executable at compilation stage. Please recompile adding it as asset or script.

Created on 12 Aug 2020  路  7Comments  路  Source: vercel/pkg

After trying to build it I get this error when trying to run it

pkg/prelude/bootstrap.js:266
if (error) throw error;
^

Error: File '/**/Tear#1261/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 (/snapshot/Tear#1261/node_modules/figlet/lib/node-figlet.js:48:23)
at Function.textSync (/snapshot/Tear#1261/node_modules/figlet/lib/figlet.js:879:43)
at Object. (/snapshot/Tear#1261/app.js)
at Module._compile (pkg/prelude/bootstrap.js:1320:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1165:10)
at Module.load (internal/modules/cjs/loader.js:994:32)
at Function.Module._load (internal/modules/cjs/loader.js:894:14) {
errno: -2,
code: 'ENOENT',
path: '/snapshot/Tear#1261/node_modules/figlet/fonts/Standard.flf',
pkg: true
}

All 7 comments

this is in my package
"bin":"./app.js",
"pkg": {
"assets": [ "./node_modules/figlet/fonts/Standard.flf,", "./termconfig/xterm.generic.js" ]

},

Same issue. My package.json
"pkg": { "assets": "error_pages/*" }

fixed it

fixed it

How did you fix it? Any pointers?

fixed it

But how ??

Related? #893

Yes, it seems so. I fixed this particular issue by directly including the node_modules path to the figlet Standard.flf font file as mentioned in that thread.

Here is my working pkg config for package.json, that fixes this particular error:

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

Hope that helps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bergheim picture bergheim  路  3Comments

serzhiio picture serzhiio  路  3Comments

Nilesh0101 picture Nilesh0101  路  4Comments

Ks89 picture Ks89  路  4Comments

ndrantotiana picture ndrantotiana  路  4Comments