npm scripts are not detected in npm-window anymore
I updated Webstorm to 2021.1 last FridayFrom that moment on the npm-windows does not show the script definition of the projects package.json anymore.
When I do open the run configuration it also shows "No npm script"
However, when I do press "Run" and then "Continue Anyway" the script is executed correctly!
Please sign in to leave a comment.
looks as if
package.json
is treated as plain text, not as JSON. Please check the registered patterns in Settings | Editor | File types, Text and Auto-detect file type by content file types - can you seepackage.json
pattern there? Also, what file type is*.json
pattern assigned to? Make sure that the latter is listed as either JSON or JSON5 typeNikita Bobers I clicked package.json right mouse contextmenu, clicked "Override File Type" to choose "JSON", and then it works fine
Elena Pogorelova I've same issue after today update v2021.2
liuq Thank you!
I had the same issue with 2021.1 as well. Not sure why *.json was removed from the json file type matching, but adding it back manually resolved the issue. I wish this had been fixed automatically in an update instead of requiring so much searching to resolve.
I had today the very same problem with 2021.2 on Mac with M1 chip. For some reason when I launched IntelliJ as admin it did worked, so I thought it‘s a problem with hombrew and where it downloads packages (can‘t be access without sudo). I solved it by installing yarn with npm instead but maybe it was not the hombrew’s fault at the end…