Skip to content

Instantly share code, notes, and snippets.

@itchyny
Created August 9, 2024 01:30
Show Gist options
  • Save itchyny/2f4f5d9f7383d44367f5931de8ded659 to your computer and use it in GitHub Desktop.
Save itchyny/2f4f5d9f7383d44367f5931de8ded659 to your computer and use it in GitHub Desktop.
import * as zlib from 'minizlib';
new zlib.Gzip({});
{
"name": "test",
"version": "1.0.0",
"private": true,
"main": "index.js",
"scripts": {
"build": "tsc --build",
"clean": "tsc --build --clean"
},
"dependencies": {
"minizlib": "3.0.1"
},
"devDependencies": {
"@types/node": "22.1.0",
"typescript": "5.5.4"
}
}
$ npm install
added 46 packages in 1s
$ npm run build
> test@1.0.0 build
> tsc --build
node_modules/minizlib/dist/commonjs/index.d.ts:6:8 - error TS1192: Module '"zlib"' has no default export.
6 import realZlib from 'zlib';
~~~~~~~~
Found 1 error.
{
"include": ["*.ts"],
"compilerOptions": {
"target": "ES2022",
"module": "CommonJS"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment