WebStorm cannot correctly identify the solution of Vue3 combined API

WebStorm cannot correctly identify the solution of Vue3 combined API

1 Problem Description

Vue3's combined API cannot be correctly recognized in WebStorm, as defineComponent and other functions cannot be recognized:

2 Attempts

I guess the reason for this problem is that the corresponding Vue3 library cannot be correctly identified. I believe WebStorm can do it, but some configurations are not correct. I tried to check node_modules in the Libraries setting, but it had no effect.

3 Solutions

The final solution is referenced here (source):

Select the node_modules folder, right-click and select Mark Directory as, and finally select Not Excluded.

It will take some time to index, just wait for it to complete.

4 Some thoughts

After looking at the WebStorm documentation, the folders in the project are divided into four categories:

  • Source: Default option, all folders are considered Source by default unless set to Tests/Resource Root/Excluded
  • Tests: Folder marked as tests
  • Resource Root: resource folder. When you enter some code that requires resources, such as ![](xxxx>), the resource files under the folder path will be automatically prompted.
  • Excluded: Folders that will be ignored by code completion, code navigation, etc. This option can improve WebStorm performance

Searching for Directories in the settings reveals that node_modules is Excluded by default:

After being marked as Not Excluded, it is no longer red:

So the solution is not that difficult, it's just that the cause cannot be identified correctly.

The above is the detailed content of the solution to WebStorm’s inability to correctly identify the Vue3 combined API. For more information about WebStorm’s inability to correctly identify the Vue3 combined API, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • How to use Webstorm and Chrome to debug Vue projects
  • How to run a Vue project with Idea or webstorm (detailed steps)
  • Set resolves.alias: ''@'' path based on vue project and adapt to webstorm
  • A fool-proof tutorial on how to build a vue-cli scaffold in webstorm
  • Solve the problem that the Webpack alias cannot be used in Vue cli scaffolding projects under Idea and WebStorm
  • How to initialize the project with webstorm+vue
  • vue: How to set up fast compilation and running in WebStorm
  • Detailed explanation of Vue syntax support in WebStorm
  • Solution to es6 syntax errors in webstorm and .vue
  • Vue template configuration and webstorm code format specification settings

<<:  How to install MySQL 5.7.17 and set the encoding to utf8 in Windows

>>:  Introduction to Kubernetes (k8s)

Recommend

How to install openjdk in docker and run the jar package

Download image docker pull openjdk Creating a Dat...

How to handle super large form examples with Vue+ElementUI

Recently, due to business adjustments in the comp...

Detailed explanation of the function and usage of DOCTYPE declaration

1. Browser rendering mode and doctype Some web pa...

Solution to the automatic termination of docker run container

Today I encountered a problem when I used Dockerf...

Use tomcat to deploy SpringBoot war package in centos environment

Prepare war package 1. Prepare the existing Sprin...

Detailed explanation of VueRouter routing

Table of contents vue router 1. Understand the co...

CSS3 radar scan map sample code

Use CSS3 to achieve cool radar scanning pictures:...

Detailed tutorial on how to install mysql8.0 using Linux yum command

1. Do a good job of cleaning before installation ...

Mysql index types and basic usage examples

Table of contents index - General index - Unique ...

Centos6.9 installation Mysql5.7.18 step record

Installation sequence rpm -ivh mysql-community-co...

centos 7 modify sshd | prohibit root login and sshd port script definition

1. Create a new user wwweee000 [root@localhost ~]...

Example of how to deploy Spring Boot using Docker

Here we mainly use spring-boot out of the box, wh...

An article to help you understand Js inheritance and prototype chain

Table of contents Inheritance and prototype chain...

Summary of Docker common commands and tips

Installation Script Ubuntu / CentOS There seems t...