Closed dancarasco closed 3 years ago
Hi @dancarasco ! Sorry for the problem! Could you please tell me, where the web-types file is linked from? Is it the project package.json
or is it a node_modules
package? Have you tried invalidating caches (File > Invalidate Caches / Restart...) ?
Hi @piotrtomiak !
No worries - the web-types file is located in an npm module in the node_modules folder. It is a Vue app (plugin) that is hosted in GitHub's NPM registry. The web-types file is located in the root directory of this npm module (next to package.json) and the module's package.json contains the entry:
"web-types": "./web-types.json",
File -> Invalidate Caches seems to have no effect - only reverting to 2020.3.0 makes web-types work again. Hope this helps, happy to provide logs.
Hey again @piotrtomiak
https://github.com/JetBrains/web-types/issues/19
After reading this similar issue posted, I saw one of your replies mentioned checking if the node_modules folder was indexed or excluded (orange) - turns out mine were excluded.
After right clicking these and setting "Not Excluded" and letting IntelliJ re-index the project, the web-types started working again!
So it seems there is some difference with the newer IntelliJ builds where these folders are excluded by default and web-types ignores them. Hope this helps!
@dancarasco Your node_modules folder should have following "colors":
So some of the packages should be indexed and some others not - we index only direct dependencies from your package.json
due to performance reasons. If the package with web-types have orange color, please ensure that it's in your project's package.json
as a dependency.
@piotrtomiak Perfect - this makes sense now. The dependency is included in package.json "dependencies" section, but IntelliJ still marked it as excluded. Not sure if this is something to do with the "@company/package" namespacing convention GitHub registry uses:
However, I have manually marked these as "Not Excluded" now and IntelliJ is indexing them fine,. and web-types has started working again for 2020.3.2 :)
@dancarasco Thanks! It looks like an issue with WebStorm. It would be great if you can file an issue in our WebStorm issue tracker: https://youtrack.jetbrains.com/issues/WEB and provide more details about your setup. You can make the issue private.
web-types version:
"vue-docgen-web-types": "^0.1.7",
App:
"vue": "^2.6.12"
IntelliJ is giving the following warning message when trying to use web-types with 2020.3.2 (latest release as of writing):
web-types.json has been generated with no errors:
When rolling back to IntelliJ 2020.3, web-types works fine. Seems to only be an issue with the latest releases. Happy to provide any logs necessary.