---
title: "Intellij IDE Does Not Support Bundler Module Resolution Yet"
date: 2023-05-19T16:51:58.000Z
author: Z.SHINCHVEN
tags: [Intellij IDEA, TypeScript, UmiJS, React, moduleResolution: Bundler]
canonical: https://atlassc.net/2023/05/19/intellij-does-not-support-bundler-module-resolution-yet
---
I created a new [UmiJS](https://umijs.org/) project today, getting a never seen error from Intellij IDEA.

> Property 'div' does not exist on type 'JSX.IntrinsicElements'.

This error is intriguing, how could a `div` not exist in `JSX.IntrinsicElements`? I checked the `node_modules` folder, the `@types/react` package is surely there.

After comparing it with one of my existing project, I found that the new UmiJS project is using [bundler](https://github.com/microsoft/TypeScript/pull/51669) as its `moduleResolution` in the extended ts-config file(`./src/.umi/tsconfig.json`):

```json
{
    "compilerOptions": {
        "moduleResolution": "bundler"
    }
}
```

Intellij IDEA highlighted the value and says `String violates the pattern`. I suspect that this is the reason why Intellij IDEA cannot resolve the `@types/react` package.

So, I override it in my `tsconfig.json` file with `node`, problem solved.

```json
{
    "compilerOptions": {
        "moduleResolution": "node"
    }
}
```
