Jade plugin not working with IntelliJ 2018.1

When a jade file is opened the error log shows the below error, copy and paste stops working in IntelliJ and files don't open instead you just get the Loading text. Hopefully this will be fixed soon as all our templates are in Jade and we have had to turn the plugin off which means debugging the templates as plain text - which is quite hard.

Error from IntelliJ log:-

`com.jetbrains.plugins.jade.psi.impl.JadeTagImpl:TAG / com.jetbrains.plugins.jade.psi.impl.JadeDocumentImpl:DOCUMENT / com.intellij.psi.impl.source.tree.FileElement:File:Pug (ex-Jade) at com.intellij.psi.impl.source.tree.LeafPsiElement.invalid(LeafPsiElement.java:109) at com.intellij.psi.impl.source.tree.LeafPsiElement.getContainingFile(LeafPsiElement.java:93) at com.intellij.psi.impl.source.tree.LeafPsiElement.isPhysical(LeafPsiElement.java:243) at com.intellij.psi.util.PsiTreeUtil.processElements(PsiTreeUtil.java:847) at com.intellij.psi.util.PsiTreeUtil.processElements(PsiTreeUtil.java:852) at com.intellij.psi.util.PsiTreeUtil.findChildOfType(PsiTreeUtil.java:248) at com.intellij.psi.util.PsiTreeUtil.findChildOfType(PsiTreeUtil.java:212) at com.jetbrains.plugins.jade.psi.impl.JadeAttributeImpl.getValueElement(JadeAttributeImpl.java:63) at com.jetbrains.plugins.jade.psi.impl.JadeAttributeImpl.getValueElement(JadeAttributeImpl.java:16) at com.intellij.psi.impl.source.xml.XmlAttributeImpl.recalculate(XmlAttributeImpl.java:402) at com.intellij.psi.impl.source.xml.XmlAttributeImpl.getFreshState(XmlAttributeImpl.java:395) at com.intellij.psi.impl.source.xml.XmlAttributeImpl.getValueTextRange(XmlAttributeImpl.java:245) at com.intellij.psi.impl.source.tree.injected.XmlAttributeLiteralEscaper.getRelevantTextRange(XmlAttributeLiteralEscaper.java:71) at com.intellij.psi.impl.source.tree.injected.PlaceInfo.getRelevantRangeInsideHost(PlaceInfo.java:52) at com.intellij.psi.impl.source.tree.injected.InjectionRegistrarImpl.decode(InjectionRegistrarImpl.java:175) at com.intellij.psi.impl.source.tree.injected.InjectionRegistrarImpl.reparse(InjectionRegistrarImpl.java:592) at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.reparse(InjectedLanguageUtil.java:750) at com.intellij.psi.impl.PsiDocumentManagerImpl.reparseChangedInjectedFragments(PsiDocumentManagerImpl.java:209) at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:688) at com.intellij.psi.impl.DocumentCommitThread.lambda$commitUnderProgress$4(DocumentCommitThread.java:451) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1129) at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:473) at com.intellij.psi.impl.DocumentCommitThread.commitSynchronously(DocumentCommitThread.java:364) at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$doCommit$1(PsiDocumentManagerBase.java:449) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1010) at com.intellij.psi.impl.PsiDocumentManagerBase.doCommit(PsiDocumentManagerBase.java:457) at com.intellij.psi.impl.PsiDocumentManagerBase.commitDocument(PsiDocumentManagerBase.java:297) at com.intellij.psi.impl.PsiDocumentManagerBase.commitAllDocuments(PsiDocumentManagerBase.java:222) at com.intellij.codeInsight.editorActions.CopyHandler.doExecute(CopyHandler.java:86) at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:207) at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:110) at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:206) at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:98) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:149) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109) at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:107) at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:86) at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:576) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$2(IdeKeyEventDispatcher.java:625) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:624) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:479) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:738) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:434) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)`

0
Avatar
Permanently deleted user

I had the same problem. According to this you need both Pug plugin AND NodeJS plugin:

https://www.jetbrains.com/help/idea/jade.html

I did not have nodeJS plugin installed but it was working fine for me before 2018 version too. I uninstalled Pug plugin and then installed nodeJS and Pug plugins (restarting IntelliJ after every change) and then it finally started working again. Hope this helps.

 

EDIT: of course the page in my link is under nodeJS in the menu tree, but the link structure itself does not suggest that.

0

请先登录再写评论。