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

Solution for Tomcat to place configuration files externally

question When we are developing normally, if we w...

Docker port mapping and external inaccessibility issues

The Docker container provides services and listen...

How to change the tomcat port number in Linux

I have several tomcats here. If I use them at the...

Several situations that cause MySQL to perform a full table scan

Table of contents Case 1: Case 2: Case 3: To summ...

How to implement input checkbox to expand the click range

XML/HTML CodeCopy content to clipboard < div s...

Complete steps to reset the root user password in mysql8

Preface Recently, many new colleagues have asked ...

MySQL foreign key constraint disable and enable commands

Disabling and enabling MySQL foreign key constrai...

Detailed tutorial on deploying apollo with docker

1. Introduction I won’t go into details about apo...

Examples of using the Li tag in HTML

I hope to align the title on the left and the dat...

CSS Sticky Footer Implementation Code

This article introduces the CSS Sticky Footer imp...

JavaScript pie chart example

Drawing EffectsImplementation Code JavaScript var...

Solution to Navicat Premier remote connection to MySQL error 10038

Remote connection to MySQL fails, there may be th...

40 web page designs with super large fonts

Today's web designs tend to display very larg...

Implementing a simple timer based on Vue method

Vue's simple timer is for your reference. The...

CSS3 achieves conic-gradient effect

grammar: background-image: conic-gradient(from an...