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

nodenext file resolution: Type error TS2307 Cannot find module 'mini-van-plate/van-plate' or its corresponding type declarations. #9

Open
btakita opened this issue Nov 14, 2023 · 1 comment

Comments

@btakita
Copy link

btakita commented Nov 14, 2023

When importing mini-van-plate/van-plate from a package with the tsconfig.json:

{
	"compileOnSave": true,
	"compilerOptions": {
		"module": "ESNext",
		"moduleResolution": "nodenext",
		"target": "ESNext",
		"strict": true
	},
	"exclude": [
		"node_modules"
	],
	"references": []
}

The following error occurs:

Type error TS2307
  Cannot find module 'mini-van-plate/van-plate' or its corresponding type declarations.

See the workaround to resolve this issue. As far as I know, it's the simpler one of two solutions. Basically, you have to have the source files in the root directory (no src/ directory), add files: to package.json, & have "moduleResolution": "nodenext" in tsconfig.json.

@Tao-VanJS
Copy link
Member

Tao-VanJS commented Nov 14, 2023

Similar issues were raised (#2, #4) before. I think #2 (comment) is the solution.

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

2 participants