I'm trying to learn nextflow but it's not going very well. I started with the tutorial of this site: https://www.nextflow.io/docs/latest/getstarted.html (I'm the one who installed nextflow).
I copied this script :
#!/usr/bin/env nextflow
params.str = 'Hello world!'
process splitLetters {
output:
file 'chunk_*' into letters
"""
printf '${params.str}' | split -b 6 - chunk_
"""
}
process convertToUpper {
input:
file x from letters.flatten()
output:
stdout result
"""
cat $x | tr '[a-z]' '[A-Z]'
"""
}
result.view { it.trim() }
But when I run it (nextflow run tutorial.nf), in the terminal I have this :
N E X T F L O W ~ version 22.03.1-edge
Launching `tutorial.nf` [intergalactic_waddington] DSL2 - revision: be42f295f4
No such variable: result
-- Check script 'tutorial.nf' at line: 29 or see '.nextflow.log' file for more details
And in the log file I have this :
avr.-20 14:14:12.319 [main] DEBUG nextflow.cli.Launcher - $> nextflow run tutorial.nf
avr.-20 14:14:12.375 [main] INFO nextflow.cli.CmdRun - N E X T F L O W ~ version 22.03.1-edge
avr.-20 14:14:12.466 [main] INFO nextflow.cli.CmdRun - Launching `tutorial.nf` [intergalactic_waddington] DSL2 - revision: be42f295f4
avr.-20 14:14:12.481 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; plugins-dir=/home/user/.nextflow/plugins; core-plugins: nf-amazon#1.6.0,nf-azure#0.13.0,nf-console#1.0.3,nf-ga4gh#1.0.3,nf-google#1.1.4,nf-sqldb#0.3.0,nf-tower#1.4.0
avr.-20 14:14:12.483 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[]
avr.-20 14:14:12.494 [main] INFO org.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
avr.-20 14:14:12.495 [main] INFO org.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
avr.-20 14:14:12.501 [main] INFO org.pf4j.DefaultPluginManager - PF4J version 3.4.1 in 'deployment' mode
avr.-20 14:14:12.515 [main] INFO org.pf4j.AbstractPluginManager - No plugins
avr.-20 14:14:12.571 [main] DEBUG nextflow.Session - Session uuid: 67344021-bff5-4131-9c07-e101756fb5ea
avr.-20 14:14:12.571 [main] DEBUG nextflow.Session - Run name: intergalactic_waddington
avr.-20 14:14:12.573 [main] DEBUG nextflow.Session - Executor pool size: 8
avr.-20 14:14:12.604 [main] DEBUG nextflow.cli.CmdRun -
Version: 22.03.1-edge build 5695
avr.-20 14:14:12.629 [main] DEBUG nextflow.Session - Work-dir: /home/user/Documents/formations/nextflow/testScript/work [ext2/ext3]
avr.-20 14:14:12.629 [main] DEBUG nextflow.Session - Script base path does not exist or is not a directory: /home/user/Documents/formations/nextflow/testScript/bin
avr.-20 14:14:12.637 [main] DEBUG nextflow.executor.ExecutorFactory - Extension executors providers=[]
avr.-20 14:14:12.648 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
avr.-20 14:14:12.669 [main] DEBUG nextflow.cache.CacheFactory - Using Nextflow cache factory: nextflow.cache.DefaultCacheFactory
avr.-20 14:14:12.678 [main] DEBUG nextflow.util.CustomThreadPool - Creating default thread pool > poolSize: 9; maxThreads: 1000
avr.-20 14:14:12.741 [main] DEBUG nextflow.Session - Session start invoked
avr.-20 14:14:13.423 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution
avr.-20 14:14:13.446 [main] DEBUG nextflow.Session - Session aborted -- Cause: No such property: result for class: Script_6634cd79
avr.-20 14:14:13.463 [main] ERROR nextflow.cli.Launcher - #unknown
groovy.lang.MissingPropertyException: No such property: result for class: Script_6634cd79
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:341)
at Script_6634cd79.runScript(Script_6634cd79:29)
at nextflow.script.BaseScript.runDsl2(BaseScript.groovy:170)
at nextflow.script.BaseScript.run(BaseScript.groovy:203)
at nextflow.script.ScriptParser.runScript(ScriptParser.groovy:220)
at nextflow.script.ScriptRunner.run(ScriptRunner.groovy:212)
at nextflow.script.ScriptRunner.execute(ScriptRunner.groovy:120)
at nextflow.cli.CmdRun.run(CmdRun.groovy:334)
at nextflow.cli.Launcher.run(Launcher.groovy:480)
at nextflow.cli.Launcher.main(Launcher.groovy:639)
What should I do ?
Thanks a lot for your help.
Nextflow includes a new language extension called DSL2, which became the default syntax in version 22.03.0-edge. However, it's possible to override this behavior by either adding nextflow.enable.dsl=1 to the top of your script, or by setting the -dsl1 option when you run your script:
nextflow run tutorial.nf -dsl1
Alternatively, roll back to the latest release (as opposed to an 'edge' pre-release). It's possible to specify the Nextflow version using the NXF_VER environment variable:
NXF_VER=21.10.6 nextflow run tutorial.nf
I find DSL2 drastically simplifies the writing of complex workflows and would highly recommend getting started with it. Unfortunately, the documentation is lagging a bit, but lifting it over is relatively straight forward once you get the hang of things:
params.str = 'Hello world!'
process splitLetters {
output:
path 'chunk_*'
"""
printf '${params.str}' | split -b 6 - chunk_
"""
}
process convertToUpper {
input:
path x
output:
stdout
"""
cat $x | tr '[a-z]' '[A-Z]'
"""
}
workflow {
splitLetters | flatten() | convertToUpper | view()
}
Results:
nextflow run tutorial.nf -dsl2
N E X T F L O W ~ version 21.10.6
Launching `tutorial.nf` [prickly_kilby] - revision: 0c6f835b9c
executor > local (3)
[b8/84a1de] process > splitLetters [100%] 1 of 1 ✔
[86/fd19ea] process > convertToUpper (2) [100%] 2 of 2 ✔
HELLO
WORLD!
I am following a tutorial in order to learn how to work with the serverless framework. The goal is to deploy a Django application. This tutorial suggests putting the necessary environment variables in a separate yml-file. Unfortunately, following the tutorial gets me a KeyError.
I have a serverless.yml, variables.yml and a handler.py. I will incert all code underneath, together with the given error.
serverless.yml:
service: serverless-django
custom: ${file(./variables.yml)}
provider:
name: aws
runtime: python3.8
functions:
hello:
environment:
- THE_ANSWER: ${self:custom.THE_ANSWER}
handler: handler.hello
variables.yml:
THE_ANSWER: 42
handler.py:
import os
def hello(event, context):
return {
"statusCode": 200,
"body": "The answer is: " + os.environ["THE_ANSWER"]
}
The error in my terminal:
{
"errorMessage": "'THE_ANSWER'",
"errorType": "KeyError",
"stackTrace": [
" File \"/var/task/handler.py\", line 7, in hello\n \"body\": \"The answer is: \" + os.environ[\"THE_ANSWER\"]\n",
" File \"/var/lang/lib/python3.8/os.py\", line 675, in __getitem__\n raise KeyError(key) from None\n"
]
}
Error --------------------------------------------------
Error: Invoked function failed
at AwsInvoke.log (/snapshot/serverless/lib/plugins/aws/invoke/index.js:105:31)
at AwsInvoke.tryCatcher (/snapshot/serverless/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/snapshot/serverless/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/snapshot/serverless/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/snapshot/serverless/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/snapshot/serverless/node_modules/bluebird/js/release/async.js:102:5)
at Immediate._onImmediate (/snapshot/serverless/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:456:21)
at process.topLevelDomainCallback (domain.js:137:15)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.18.1
Framework Version: 2.0.0 (standalone)
Plugin Version: 4.0.2
SDK Version: 2.3.1
Components Version: 3.1.2
The command i'm trying is 'sls invoke -f hello'. The command 'sls deploy' has been already executed succesfully.
I am new to serverless, so please let me know how to fix this, or if any more information is needed.
First of all, there is an error in yml script:
Serverless Error ---------------------------------------
Invalid characters in environment variable 0
The error is defining environment variables as an array instead of key-value pairs
And then after deployment, everything works smoothly (sls deploy -v)
sls invoke --f hello
{
"statusCode": 200,
"body": "The answer is: 42"
}
serverless.yml
service: sls-example
custom: ${file(./variables.yml)}
provider:
name: aws
runtime: python3.8
functions:
hello:
environment:
THE_ANSWER: ${self:custom.THE_ANSWER}
handler: handler.hello
variables.yml
THE_ANSWER: 42
I've installed the Pug (Ex-Jade) plugin and added a new file template
When creating a new .pug-file, PhpStorm creates a file which I can't open.
I've already followed the instructions on the official page but it didn't help out.
What step did I miss? Any help would be great!
Edit:
I have uninstalled the Pug plugin, invalidated the cache and restarted.
Then removed the template i've created because pstorm created a new template called "Pug/Jade File". Then i created a new file from the context menu but again, a file name with a blank icon.
I was curious and opened another project where i've created a .pug file, but same error. So this tells me it has to do with the app itself.
The idea log doesn't show anything which could lead to an answer, but here:
2016-09-23 11:59:57,956 [ 2501] INFO - ellij.vfs.persistent.FSRecords - Filesystem storage is corrupted or does not exist. [Re]Building. Reason: Corruption marker file found
2016-09-23 11:59:57,960 [ 2505] INFO - ellij.vfs.persistent.FSRecords - Marking VFS as corrupted: '/Users/morten.sassi/Library/Caches/PhpStorm2016.2/caches/names.dat' does not exist
2016-09-23 11:59:57,962 [ 2507] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=970
2016-09-23 11:59:57,995 [ 2540] INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: /Applications/PhpStorm.app/Contents/bin/fsnotifier
2016-09-23 11:59:58,006 [ 2551] INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational.
2016-09-23 11:59:58,132 [ 2677] INFO - pi.util.registry.RegistryState - Registry values changed by user:
2016-09-23 11:59:58,132 [ 2677] INFO - pi.util.registry.RegistryState - dumb.aware.run.configurations = true
2016-09-23 11:59:58,459 [ 3004] INFO - .history.utils.LocalHistoryLog - FS has been rebuild, rebuilding local history...
2016-09-23 11:59:58,820 [ 3365] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2016-09-23 11:59:58,969 [ 3514] INFO - gs.impl.UpdateCheckerComponent - channel: release
2016-09-23 11:59:59,109 [ 3654] INFO - il.indexing.FileBasedIndexImpl - Index exts enumerated:65
2016-09-23 11:59:59,113 [ 3658] INFO - il.indexing.FileBasedIndexImpl - Index scheduled:3
2016-09-23 11:59:59,160 [ 3705] INFO - tellij.psi.stubs.StubIndexImpl - All stub exts enumerated:11
2016-09-23 11:59:59,160 [ 3705] INFO - tellij.psi.stubs.StubIndexImpl - stub exts update scheduled:0
2016-09-23 11:59:59,273 [ 3818] INFO - stubs.SerializationManagerImpl - Name storage is repaired
2016-09-23 11:59:59,277 [ 3822] INFO - j.ide.script.IdeStartupScripts - 0 startup script(s) found
2016-09-23 11:59:59,617 [ 4162] INFO - ij.psi.stubs.StubUpdatingIndex - Following new file types will be indexed:htaccess,Jade,HTML,SCSS,SQL,TypeScript JSX,CSS,Sass,TypeScript,PHP,JavaScript,JSX Harmony,Less,ActionScript,XML,CoffeeScript,Ini,ECMAScript 6,Literate CoffeeScript
2016-09-23 11:59:59,816 [ 4361] INFO - plication.impl.ApplicationImpl - 85 application components initialized in 2522 ms
2016-09-23 11:59:59,846 [ 4391] INFO - .intellij.idea.IdeaApplication - App initialization took 5262 ms
2016-09-23 12:00:00,255 [ 4800] INFO - .openapi.application.Preloader - Finished preloading com.intellij.openapi.actionSystem.impl.ActionPreloader#3162f833
2016-09-23 12:00:00,975 [ 5520] INFO - pl$FileIndexDataInitialization - Initialization done:1862
2016-09-23 12:00:01,079 [ 5624] INFO - .openapi.application.Preloader - Finished preloading com.intellij.ide.ui.search.SearchableOptionPreloader#71931992
2016-09-23 12:00:01,445 [ 5990] INFO - ellij.project.impl.ProjectImpl - 116 project components initialized in 878 ms
2016-09-23 12:00:01,494 [ 6039] INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 48 ms
2016-09-23 12:00:01,727 [ 6272] INFO - PerformancePlugin - Performance Plugin is in silent mode
2016-09-23 12:00:02,200 [ 6745] INFO - exImpl$StubIndexInitialization - Initialization done:1224
2016-09-23 12:00:02,862 [ 7407] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 711ms; general responsiveness: ok; EDT responsiveness: 1/1 sluggish
2016-09-23 12:00:03,133 [ 7678] INFO - tartup.impl.StartupManagerImpl - /Users/morten.sassi/www/musterrechnung/.idea case-sensitivity: expected=true actual=true
2016-09-23 12:00:03,412 [ 7957] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 548ms; general responsiveness: ok; EDT responsiveness: ok
2016-09-23 12:00:03,413 [ 7958] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 1178 files to update
2016-09-23 12:00:04,947 [ 9492] INFO - tor.impl.FileEditorManagerImpl - Project opening took 4459 ms
2016-09-23 12:00:06,053 [ 10598] ERROR - jediterm.terminal.TerminalMode - Mode EightBitInput is not implemented, setting to true
2016-09-23 12:00:18,634 [ 23179] INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 15221ms; general responsiveness: ok; EDT responsiveness: 2/16 sluggish
2016-09-23 12:00:19,519 [ 24064] INFO - tellij.xml.Html5SchemaProvider - HTML5_SCHEMA_LOCATION = /Applications/PhpStorm.app/Contents/lib/phpstorm.jar!/resources/html5-schema/html5.rnc
2016-09-23 12:00:19,519 [ 24064] INFO - tellij.xml.Html5SchemaProvider - XHTML5_SCHEMA_LOCATION = /Applications/PhpStorm.app/Contents/lib/phpstorm.jar!/resources/html5-schema/xhtml5.rnc
2016-09-23 12:00:19,519 [ 24064] INFO - tellij.xml.Html5SchemaProvider - CHARS_DTD_LOCATION = /Applications/PhpStorm.app/Contents/lib/phpstorm.jar!/resources/html5-schema/html5chars.ent
2016-09-23 12:03:24,297 [ 208842] INFO - ellij.project.impl.ProjectImpl - 20 project components initialized in 24 ms
2016-09-23 12:03:24,308 [ 208853] INFO - le.impl.ModuleManagerComponent - 0 module(s) loaded in 0 ms
2016-09-23 12:05:19,192 [ 323737] INFO - llij.help.impl.HelpManagerImpl - Failed to load help set from 'jar:file:////Applications/PhpStorm.app/Contents/help/null!/null/Help.hs'
javax.help.HelpSetException: Could not parse
Got an IOException (/Applications/PhpStorm.app/Contents/help/null (No such file or directory))
Parsing failed for null
at javax.help.HelpSet.<init>(HelpSet.java:154)
at com.intellij.help.impl.HelpManagerImpl.a(HelpManagerImpl.java:133)
at com.intellij.help.impl.HelpManagerImpl.a(HelpManagerImpl.java:107)
at com.intellij.help.impl.HelpManagerImpl.invokeHelp(HelpManagerImpl.java:57)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.doHelpAction(SingleConfigurableEditor.java:171)
at com.intellij.openapi.ui.DialogWrapper$HelpAction.actionPerformed(DialogWrapper.java:1894)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:793)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:625)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:778)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:455)
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1665)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1607)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.access$801(SingleConfigurableEditor.java:45)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.a(SingleConfigurableEditor.java:127)
at com.intellij.openapi.project.DumbPermissionServiceImpl.allowStartingDumbModeInside(DumbPermissionServiceImpl.java:37)
at com.intellij.openapi.project.DumbService.allowStartingDumbModeInside(DumbService.java:283)
at com.intellij.openapi.options.ex.SingleConfigurableEditor.show(SingleConfigurableEditor.java:127)
at com.intellij.ide.actions.EditFileTemplatesAction.actionPerformed(EditFileTemplatesAction.java:31)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:197)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:156)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:211)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.a(ActionMenuItem.java:304)
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:905)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.a(ActionMenuItem.java:112)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109)
at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:513)
at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:793)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:625)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:385)
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)
2016-09-23 12:05:35,092 [ 339637] WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: editor for id: editor.preferences.import
2016-09-23 12:05:56,020 [ 360565] INFO - PerformancePlugin - Execution has been finished
2016-09-23 12:05:56,089 [ 360634] INFO - org.jetbrains.io.BuiltInServer - web server stopped
2016-09-23 12:05:56,089 [ 360634] INFO - Types.impl.FileTypeManagerImpl - FileTypeManager: 64 auto-detected files
Elapsed time on auto-detect: 1067 ms
2016-09-23 12:05:56,093 [ 360638] INFO - stubs.SerializationManagerImpl - START StubSerializationManager SHUTDOWN
2016-09-23 12:05:56,093 [ 360638] INFO - stubs.SerializationManagerImpl - END StubSerializationManager SHUTDOWN
2016-09-23 12:05:56,093 [ 360638] INFO - il.indexing.FileBasedIndexImpl - START INDEX SHUTDOWN
2016-09-23 12:05:56,126 [ 360671] INFO - il.indexing.FileBasedIndexImpl - END INDEX SHUTDOWN
2016-09-23 12:05:56,131 [ 360676] INFO - pl.local.NativeFileWatcherImpl - Watcher terminated with exit code 0
2016-09-23 12:05:56,132 [ 360677] INFO - newvfs.persistent.PersistentFS - VFS dispose started
2016-09-23 12:05:56,145 [ 360690] INFO - newvfs.persistent.PersistentFS - VFS dispose completed
2016-09-23 12:05:56,190 [ 360735] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------
2016-09-23 12:05:56,190 [ 360735] INFO - org.jetbrains.io.BuiltInServer - web server stopped
2016-09-23 12:06:01,416 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2016-09-23 12:06:01,438 [ 22] INFO - #com.intellij.idea.Main - IDE: PhpStorm (build #PS-162.1889.1, 23 Aug 2016 00:00)
2016-09-23 12:06:01,438 [ 22] INFO - #com.intellij.idea.Main - OS: Mac OS X (10.11.6, x86_64)
2016-09-23 12:06:01,438 [ 22] INFO - #com.intellij.idea.Main - JRE: 1.8.0_76-release-b216 (JetBrains s.r.o)
2016-09-23 12:06:01,438 [ 22] INFO - #com.intellij.idea.Main - JVM: 25.76-b216 (OpenJDK 64-Bit Server VM)
2016-09-23 12:06:01,444 [ 28] INFO - #com.intellij.idea.Main - JVM Args: -Dfile.encoding=UTF-8 -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Xverify:none -XX:ErrorFile=/Users/morten.sassi/java_error_in_phpstorm_%p.log -XX:HeapDumpPath=/Users/morten.sassi/java_error_in_phpstorm.hprof -Xbootclasspath/a:../lib/boot.jar -Xms128m -Xmx1024m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=240m -XX:+UseCompressedOops -Djb.vmOptionsFile=/Users/morten.sassi/Library/Preferences/PhpStorm2016.2/phpstorm.vmoptions -Didea.java.redist=jdk-bundled -Didea.home.path=/Applications/PhpStorm.app/Contents -Didea.executable=phpstorm -Didea.platform.prefix=PhpStorm -Didea.paths.selector=PhpStorm2016.2
2016-09-23 12:06:01,444 [ 28] INFO - #com.intellij.idea.Main - ext: /Applications/PhpStorm.app/Contents/jre/jdk/Contents/Home/jre/lib/ext: [cldrdata.jar, dnsns.jar, jaccess.jar, jfxrt.jar, localedata.jar, meta-index, nashorn.jar, sunec.jar, sunjce_provider.jar, sunpkcs11.jar, zipfs.jar]
2016-09-23 12:06:01,444 [ 28] INFO - #com.intellij.idea.Main - ext: /System/Library/Java/Extensions: [MRJToolkit.jar]
2016-09-23 12:06:01,445 [ 29] INFO - #com.intellij.idea.Main - JNU charset: UTF-8
2016-09-23 12:06:01,461 [ 45] INFO - #com.intellij.idea.Main - JNA library loaded (64-bit) in 16 ms
2016-09-23 12:06:01,464 [ 48] INFO - #com.intellij.idea.Main - initializing environment
2016-09-23 12:06:01,465 [ 49] INFO - .intellij.util.EnvironmentUtil - loading shell env: /bin/bash -l -i -c '/Applications/PhpStorm.app/Contents/bin/printenv.py' '/private/var/folders/k6/vcb7qtwd5b98_87mt_1588mr8vdjcy/T/intellij-shell-env.tmp'
2016-09-23 12:06:01,472 [ 56] INFO - #com.intellij.util.ui.JBUI - UI scale factor: 1.0
2016-09-23 12:06:02,089 [ 673] INFO - .intellij.util.EnvironmentUtil - shell environment loaded (30 vars)
2016-09-23 12:06:03,470 [ 2054] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor js-nashorn-support.xml
2016-09-23 12:06:03,512 [ 2096] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor plugin-intelliLang.xml
2016-09-23 12:06:03,556 [ 2140] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor uml-properties-support.xml
2016-09-23 12:06:03,557 [ 2141] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor uml-java-support.xml
2016-09-23 12:06:03,739 [ 2323] INFO - llij.ide.plugins.PluginManager - 64 plugins initialized in 406 ms
2016-09-23 12:06:03,741 [ 2325] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: ASP (0.1), AngularJS (162.1889.1), Apache config (.htaccess) support (162.1889.1), Behat Support (162.1889.1), Blade Support (162.1889.1), CSS Support (162.1889.1), CVS Integration (11), CoffeeScript (2.0), Command Line Tool Support (162.1889.1), Copyright (8.1), Database Tools and SQL (1.0), Drupal Support (162.1889.1), File Watchers (162.1889.1), GNU GetText files support (*.po) (136.SNAPSHOT), Gherkin (999.999), Git Integration (8.1), GitHub (162.1889.1), Google App Engine Support for PHP (162.1889.1), HAML (162.1889.1), HTML Tools (2.0), IDEA CORE (162.1889.1), Ini4Idea (162.1889.1), IntelliLang (8.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Joomla! Support (162.1889.1), LESS support (162.1889.1), Markdown support (VERSION), NodeJS (162.1889.1), PHP (162.1889.1), PHP Remote Interpreter (162.1889.1), Perforce Integration (2.0), Performance Testing (162.1889.1), Phing Support (162.1889.1), QuirksMode (162.1889.1), REST Client (162.1889.1), ReStructuredText Support (136.SNAPSHOT), Refactor-X (2.01), Remote Hosts Access (0.1), SASS support (162.1889.1), SSH Remote Run (0.1), Settings Repository (162.1889.1), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TextMate bundles support (VERSION), Time Tracking (1.0), Twig Support (162.1889.1), UML Support (1.0), Vagrant (0.6.VERSION), W3C Validators (2.0), WordPress Support (162.1889.1), XPathView + XSLT Support (4), XSLT-Debugger (1.4), YAML (162.1889.1), hg4idea (10.0)
2016-09-23 12:06:03,741 [ 2325] INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: Bootstrap 3 (2.2.1), JS Toolbox (1.9), Laravel Plugin (0.11), LiveEdit (162.1117), Material Theme UI (0.2.1), RegexpTester (1.0.5), Yeoman (162.61)
2016-09-23 12:06:04,017 [ 2601] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=970
2016-09-23 12:06:04,073 [ 2657] INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: /Applications/PhpStorm.app/Contents/bin/fsnotifier
2016-09-23 12:06:04,082 [ 2666] INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational.
2016-09-23 12:06:04,200 [ 2784] INFO - pi.util.registry.RegistryState - Registry values changed by user:
2016-09-23 12:06:04,200 [ 2784] INFO - pi.util.registry.RegistryState - dumb.aware.run.configurations = true
2016-09-23 12:06:04,833 [ 3417] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2016-09-23 12:06:04,985 [ 3569] INFO - gs.impl.UpdateCheckerComponent - channel: release
2016-09-23 12:06:05,106 [ 3690] INFO - il.indexing.FileBasedIndexImpl - Index exts enumerated:32
2016-09-23 12:06:05,109 [ 3693] INFO - il.indexing.FileBasedIndexImpl - Index scheduled:3
2016-09-23 12:06:05,125 [ 3709] INFO - tellij.psi.stubs.StubIndexImpl - All stub exts enumerated:11
2016-09-23 12:06:05,125 [ 3709] INFO - tellij.psi.stubs.StubIndexImpl - stub exts update scheduled:0
2016-09-23 12:06:05,277 [ 3861] INFO - il.indexing.FileBasedIndexImpl - Version has changed for index TodoIndex. The index will be rebuilt.
2016-09-23 12:06:05,293 [ 3877] INFO - j.ide.script.IdeStartupScripts - 0 startup script(s) found
2016-09-23 12:06:05,464 [ 4048] INFO - il.indexing.FileBasedIndexImpl - Version has changed for index IdIndex. The index will be rebuilt.
2016-09-23 12:06:05,681 [ 4265] INFO - il.indexing.FileBasedIndexImpl - Version has changed for index filetypes. The index will be rebuilt.
2016-09-23 12:06:05,863 [ 4447] INFO - plication.impl.ApplicationImpl - 85 application components initialized in 2531 ms
2016-09-23 12:06:05,895 [ 4479] INFO - .intellij.idea.IdeaApplication - App initialization took 5257 ms
2016-09-23 12:06:05,956 [ 4540] INFO - ij.psi.stubs.StubUpdatingIndex - requesting complete stub index rebuild due to changes: removed file types:Jade
2016-09-23 12:06:05,956 [ 4540] INFO - il.indexing.FileBasedIndexImpl -
Edit 2:
Reinstalled PHPStorm (Uninstalled via CleanMyMac) but still same error. Somehow the IDE kept all settings and plugins
Okay got the problem!
In: Preferences | Editor | File Types | Jade
there was only *.jade as registered pattern, so adding *.pug did the trick!
I guess i "broke" it initially when creating that file template.