phpstorm 미해결 함수 또는 메서드 $ ()
다음과 같은 문제가 있습니다. phpstorm이 jquery 메서드를 인식하지 못하며 여기저기서 볼 수 있습니다.
해결되지 않은 함수 또는 메서드 $ ()
이것은 나를 괴롭 혔지만 마침내 File-> Settings-> JavaScript-> Libraries로 제거 하고 jquery를 전역 / 프로젝트로 추가하려고했습니다.
내 라이브러리 설정은 다음과 같습니다.
그러나 아무것도 변경되지 않았습니다. 나는 아직도 그 성가신 통지를 본다. 누구든지 그들을 제거하는 방법을 알고 있습니까?
정말 어리석은 해결 방법이 있습니다.
IDE 자체에서 라이브러리 ( 이 경우 jQuery )를 다운로드합니다 .
- 설정 열기 ( Linux에서 Ctrl + Alt + S )
- Navigate to Languages & Frameworks -> Javascript -> Libraries
- Click Download and choose jQuery
Hopefully the errors will vanish
Cheers
EDIT: After running the IDE through Fiddler, I realised this only solves the problem because of the version the IDE downloads.
So, the correct workaround is to Add older, non-AMD jQuery versions as a Global scoped Library and add the latest one as a Project scope library.
The latest non-AMD versions are:
1.10.2 for 1.x series. And, 2.0.0 for 2.x series.
I had the same issue with version 1.11.2, and resolved it simply by adding the uncompressed version into my js folder.
The jQuery v1.11.0 shows exactly the same behaviour here as well. At the same time previous version 1.10.2 works fine in IDE (no warnings).
I think it has something to do with "AMD-fy jQuery source" ticket (http://bugs.jquery.com/ticket/14113) -- looks like IDE has some issues figuring out this style.
If you wish (and can) -- roll back to jQuery v1.10.2 (which is like half a year old, which means it's stable and still good to use).
Hopefully IDE will be able to properly parse this new jQuery style in next release.
Actual ticket: http://youtrack.jetbrains.com/issue/WEB-10908
압축되지 않은 버전의 jQuery를 프로젝트 폴더에 복사하십시오. 프로젝트로 가져올 필요도없고 javascript 폴더에 복사하기 만하면됩니다.
phpstorm에서 1.11.0과 1.10.2를 모두 가져 오면 해결됩니다.
프로젝트를 롤백 할 필요가 없습니다.
참고 URL : https://stackoverflow.com/questions/21616683/phpstorm-unresolved-function-or-method
'Development Tip' 카테고리의 다른 글
Bash에서 날짜 시간 문자열을 epoch로 변환 (0) | 2020.11.01 |
---|---|
다운로드 한 파일의 이름을 wget으로 바꾸는 방법은 무엇입니까? (0) | 2020.11.01 |
수은 체인지 셋의 사용자 이름을 변경할 수 있습니까? (0) | 2020.11.01 |
Dia의 UML 시퀀스 다이어그램? (0) | 2020.11.01 |
홈브류 공식을 수정하는 방법? (0) | 2020.11.01 |