You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkg is failing to properly include the tslib dependency. This is needed by async-locks and cheerio as a dependency.
The problem seems to be that pkg is adding the tslib files to the queue during the walker phase but only as the bytecode. during the packing phase when it attempts to add the required files it skips them due to our use of the --no-bytecode flag. Thus throwing the following error.
> Error! --no-bytecode and no source breaks final executable
/home/faulkes/matrixcode/polykey/js-polykey/node_modules/tslib/tslib.js
Please run with "-d" and without "--no-bytecode" first, and make
sure that debug log does not contain "was included as bytecode".
We suspect this may be due to pkg not properly parsing es6 modules. Discussion about this can be found starting from here
Currently a stopgap fix is to force include tslib by adding the files as an asset to the pkg config in package.json.
You've fixed this by adding tslib directly into the pkg configuration in #379. We're going to side-step this issue by solving the root of the problem in MatrixAI/Polykey-CLI#23 by using a purpose-built bundler first, then using pkg only for the last step of combining it virtual filesystem for non-js assets, and native addons as well as the node executable.
Specification
pkg
is failing to properly include thetslib
dependency. This is needed byasync-locks
andcheerio
as a dependency.The problem seems to be that
pkg
is adding thetslib
files to the queue during the walker phase but only as the bytecode. during the packing phase when it attempts to add the required files it skips them due to our use of the--no-bytecode
flag. Thus throwing the following error.We suspect this may be due to pkg not properly parsing es6 modules. Discussion about this can be found starting from here
Currently a stopgap fix is to force include
tslib
by adding the files as an asset to the pkg config inpackage.json
.Additional context
Tasks
The text was updated successfully, but these errors were encountered: