Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"clean" is not properly exported #26

Open
slhck opened this issue Dec 17, 2024 · 0 comments
Open

"clean" is not properly exported #26

slhck opened this issue Dec 17, 2024 · 0 comments

Comments

@slhck
Copy link

slhck commented Dec 17, 2024

I get the following error:

error TS2307: Cannot find module 'easydl/utils' or its corresponding type declarations.

Based on the following TypeScript code (TS 5.6.3) in an ESM project:

import { clean as easyDlClean } from "easydl/utils";

My tsconfig:

{
	"compilerOptions": {
		/* Base Options: */
		"esModuleInterop": true,
		"skipLibCheck": true,
		"target": "ES2022",
		"allowJs": true,
		"outDir": "dist",
		"moduleDetection": "force",
		"moduleResolution": "NodeNext",
		"isolatedModules": true,
		"verbatimModuleSyntax": true,

		/* Strictness */
		"strict": true,
		"noUncheckedIndexedAccess": true,
		"noImplicitOverride": true,

		/* AND if you're building for a library: */
		"declaration": false,

		/* If NOT transpiling with TypeScript: */
		"module": "NodeNext",
		"noEmit": true,

		/* If your code doesn't run in the DOM: */
		"lib": ["es2022"]
	}
}

This works though:

import { clean as easyDlClean } from "easydl/dist/utils.js";

Should you be simply exporting the clean function from the main file instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant