Closed ariran5 closed 11 months ago
I use esbuld for bundle my typescript nodejs project to single file for docker container, and sqlite3 has many bad dependencies. see here npm graph
My command for bundle
esbuild src/index.ts --bundle --platform=node --target=node21 --outdir=dist --format=esm --banner:js="import {createRequire} from 'node:module'; const require = createRequire(import.meta.url)"
use this command for testing basic typescript project + esbuild
================
sqlite3 has dependency "@mapbox/node-pre-gyp" and i see, this package has bad imports without filename
node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js:86:21: 86 │ return require('./' + command)(self, argvx, callback);
and aws imports without this dependencies
node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:43:28: 43 │ const AWSMock = require('mock-aws-s3'); node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:76:22: 76 │ const AWS = require('aws-sdk'); node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:112:23: 112 │ const nock = require('nock');
I Cant bundle this
5.1.6
21
windows 11 x86
This was fixed in https://github.com/TryGhost/node-sqlite3/commit/605c7f981abbcf980cb44f54abba285de9a69a23, there should be a RC release soon, and then full release after 🙂
Issue Summary
I use esbuld for bundle my typescript nodejs project to single file for docker container, and sqlite3 has many bad dependencies. see here npm graph
My command for bundle
use this command for testing basic typescript project + esbuild
================
sqlite3 has dependency "@mapbox/node-pre-gyp" and i see, this package has bad imports without filename
and aws imports without this dependencies
I Cant bundle this
Steps to Reproduce
Version
5.1.6
Node.js Version
21
How did you install the library?
windows 11 x86