FAQ Database Discussion Community

I get an error — Error: [$injector:nomod] http://errors.angularjs.org/1.3.15/$injector/nomod?p0=decisionTree when I run karma.cong.js in Webstorm

Here is my karma.conf.js file module.exports = function(config) { var configuration = { basePath : '', autoWatch : false, frameworks: ['jasmine'], files: [ 'bower_components/angular/angular.min.js', 'bower_components/angular-mocks/angular-mocks.js', 'bower_components/angular-resource/angular-resource.min.js', 'bower_components/angular-animate/angular-animate.min.js', 'bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js', 'bower_components/angular-cookies/angular-cookies.min.js',...

WebStorm: Disabling language injection coloring

WebStorm is injecting the css coloring rules in my JavaScript. For example in the following code block... $('.navbar-collapse ul li a').click(function() { $('.navbar-toggle:visible').click(); }); Everything inside '.navbar-collapse ul li a' is colored according to the css color rules. I would like this to be colored like a normal javascript string....

How to completely uninstall webstorm on ubuntu [closed]

I am trying to remove Webstorm editor completely from my Ubuntu 14.04, I have already tried by removing its installation folder but its settings still exists, is there any command exist to remove it completely or what any other way? please help me out?

Webstorm not ignoring directories marked “excluded”

I have marked the WebContent/desktop/build directory as excluded, but Webstorm is still trying to index it. This is annoying whenever I build, and I have to wait for Webstorm to finish indexing before I can do anything. How do I make it not index anything in the folder? Here's what...

compass:dist & execFile(“compass.bat”, …) - Warning: spawn EPERM

First of all, I am pretty new to (modern) web development and I tried to import an existing project into my WebStorm and run a Grunt task. It stops at "compass:dist" with: $ node.exe C:\Users\lgr\AppData\Roaming\npm\node_modules\grunt-cli\bin\grunt --gruntfile C:\Users\lgr\workspace\js\rit-workshop\ui\Gruntfile.js buildall Initializing Command-line options: --gruntfile=C:\Users\lgr\workspace\js\rit-workshop\ui\Gruntfile.js, --verbose Reading "Gruntfile.js" Gruntfile...OK Registering Gruntfile tasks. Registering...

Typescript and webstorm, missing --module flag

Editing a typescript project, that was created on VisualStudio, in WebStorm is replying this error: Error:(1, 1) TS1148: Cannot compile external modules unless the '--module' flag is provided. the code is simple like this: in file Test.ts class helloWorld{ } export = helloWorld; Thanks in advance for your help EDITED...

Confusion of WebStorm type recognition of function return types

Using the following code: /** * @typedef {foo} MyFoo * @property {String} fooText * @property {Number} fooValue */ /** * @type {MyFoo} */ var foo = { fooText : '', fooValue : 0 }; /** * @param {MyFoo} someFoo * @returns {MyFoo} */ function doStuff(someFoo) { var result = Object.create(foo);...

Webstorm SystemJS import resolve error

SystemJS makes it possible to specify what kind of content is rendered from the imported files: CSS System.import('my/file.css!') Image System.import('some/image.png!image') JSON System.import('some/data.json!').then(function(json){}) Text System.import('some/text.txt!text').then(function(text) {}) (Source) Using SystemJS, importing from a file with a type appended, gives an error in Webstorm. So when I do this: import template from './404.template.html!text';...

node does not output using console log

I fairly new to nodejs and I put the following code in some module, module.exports = function (app) { app.get('/aa', function(req, res) { console.log("test"); debugger; res.send('file updated'); ... the application is working and I see in the browser "file updated" but I've two problems: why don't I see "test" in...

WebStorm: Hide html selector toolbar

In WebStorm I want to hide the toolbar that appears on html files at the top. It shows the html selectors and ids drill down. I've circled it in the below picture... ...

Dust file doesn't open in Webstorm IDE 8.0.5

I am trying to open a Dust (.dust) file in WebStorm but it doesn't open. I also installed Dust Plugin from WebStorm Plugin repository but I still can't open a Dust file. I am using WebStorm 8.0.5. I also tried to open Dust with File -> Open option but I...

What exactly I should do to make 'angular' resolved in .ts file in WebStorm

I wonder.. what exactly I should do to make WebStrom (or IntelliJ IDEA) resolve my 'angular' variable. I follows this guy but that maybe deprecated already. On my vendor.d.ts: /// <reference path="../typings/jquery/jquery.d.ts" /> /// <reference path="../typings/angularjs/angular.d.ts" /> My package json: { "name": "angular_ts", "version": "0.1.0", "description": "", "repository": {}, "dependencies":...

Jade language injection in Webstorm

I have an HTML element whose contents I want to be treated as Jade (it will be compiled to pure html later). Webstorm obviously doesn't recognise this so it has no syntax highlighting: If I go to add jade as a language injection, it isn't listed as one of the...

Make Webstorm highlight .txt files as HTML

So I have some project files all with .txt extensions which are really HTML templates. I am trying to syntax highlight those .txt files as HTML using Webstorm. Any tips on how to do that?

WebStorm: How can I link the HTML to an installed JS library?

I'm working with WebStorm. I used it's built-in feature to install jQuery. It now appears in the External Libraries section of the project. But I can't link my Html files to it (<script src="???"></script>). How can this be done?...

Stylesheets not showing up for Ionic App

I've built a small Ionic App in WebStorm using a simple tutorial for building a side-menu. It runs and everything when I bring it up in an emulator using Cordova, but none of the styling from Ionic seems to be working, even though it all appears to be part of...

What is the type of an object literal key as defined in TypeScript?

I'm not using TypeScript as the primary language for this application, but as the type-hinting assist for JetBrains' WebStorm alongside JSDocs. I'm also using the keyMirror utility to create quasi-enum object literals. Given the following: //enums.js var keyMirror = require('keyMirror'); module.exports = { CRUDVerbs: keyMirror({ //keymirror mirrors the key to...

How to Debug Ionic WebApp?

I want to debug my ionic application in WebStorm. I am able to run the app in browser. But how can I debug? I tried: ionic serve --debug which doesn't seem to trigger any debugging? How can I debug the app when it runs in browser?...

Node Express.js 4 Route Not working, Getting 404

I've been trying to debug my route in my express app. The request is undefined but not sure why. I'm using Express 4.0 but running it Express 3.0 style (no bin/www). server.js var app = require('./app') var port = process.env.PORT || 3000; app.set('port', port); app.listen(app.get('port', function(){ console.log('Express web server is...

Shortcut to move the cursor to certain characters in Webstorm

I've seen several videos where the user is using Webstorm and hits a keyboard shortcut which brings up a small input field that the user can type a letter, number or other character into. Webstorm then presents the user with several choices denoted by "A", "B", "C", etc. which the...

Update multiple vendor prefix styles in webstorm

In Webstorm 10, you can insert all vendor prefix styles using built in emmet. For instance, you type in -border-radius followed by the TAB key, it will automatically create the vendor specific styles for you. Then you can type in eg. 10px and it will apply the style to all...

Unresolved property variable when returned from method

... doChunk().then(function (results) { angular.forEach(results, function (info) { if (info.data.fields.worklog) { configProcess.results.push(info.data); ... The above is just a sample from my AngularJS application, but it's the same issue for all data (and vanilla JS) that's returned from somewhere else - like an HTTP request in this case. results - is...

How to use WebStorm JavaScript Debug configuration without Google Chrome?

I have FF (v.35), Opera (v.12), and IE (v.11) installed on my Win 7 x64 PC and wanted to debug a (locally stored) HTML file that loads a JS script. After adding the file to a new project, I went to File > Settings > Tools > Web Browsers and...

Group files in Webstorm / IntelllijIDEA

Is it possible to group related items in Webstorm same way as in Visual Studio (Group files in Visual Studio)?

Webstorm special character encoding

Does Web storm automatically convert special characters to HTML entities ? I tried to find something on Internet,had no luck.

Prevent webstorm watcher from running on checkout new branch

Add the moment my less and handlebar files get recompiled every time I check out another branch. Is there a way to run the watcher only when file was saved and not when it was changed in cause of checking out a branch.

How to get intellisense for Bootstrap 3?

I am using WebStorm 10 for OS X Yosemite and trying to get intellisense for bootstrap. I used this link but so far it has not worked out: http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/ Any ideas how to fix this?...

Angular parameter types on jsdoc

I'm wondering what are the "proper" parameter types on angular specified stuff within jsdoc? Eg. if I have something like: /** * Some comment * * @param {WhatHere} $http * @param {WhatHere} $timeout */ function FooBar($http, $timeout) { } What are the proper types for those $http and $timeout so...

TypeScript problems in webstorm using the “import” statement

When I tried using the import statement in webstorm with TypeScript enabled I get the error Error:(14, 1) TS1148: Cannot compile external modules unless the '--module' flag is provided. However if I add the --module flag to the TypeScript command line options under "webstorm Preferences -> Languages and Frameworks ->...

WebStorm not tabbing correctly on a single file

For some strange reason, WebStorm has decided that all tabs typed in for a single file shall be single spaces, instead of the 4 the editor is set for. I have checked, all my other source files are still working correctly. Things I have tried: Closing tab and reopening Renaming...

Webstorm IDE: Live Template - Accessing the project name

I am brand new to Webstorm and live templates. But after doing some researching I can't figure out how to include the project name into a live template. It looks like its easy enough in a regular template ${PROJECT_NAME} but I can't find a $PROJECTNAME$ equivalent for live templates. Does...

Define same type for multiple variables, recognition in Webstorm

var foo, bar; For this statement and using JSDoc, how to set both variables as a given type in one line so that WebStorm recognizes it? Arbitrarily, let's take String and use a working example: /** * @type {String} */ var foo; /** * @type {String} */ var bar; Both...

Webstorm: Ctrl + Arrow not working. How to fix?

I downloaded Webstorm 10.0.2 and noticed that when I pressing Ctrl+Left/Right it selects char as Shift+Left/Right but not jumps over word. And at Keymap Settings when I'm trying to add shortcut and pressing Ctrl+Left/Right it doesn't show this shortcut, but Ctrl+Any other works normally. Also, at PhpStorm 7.1.3 Ctrl+Left/Right works...

In Jetbrains IDEs, is there a way to see changed rows since a specific commit, instead of working copy changes?

In Jetbrains IDEs, rows that reflect working copy changes are annotated in the left hand side in green/blue or a small triangle for removed rows. For example, see the green annotation in the following screenshot: Is there a way to configure the SVN integration that will allow showing changed rows...

Browserify paths and Webstorm configuration

I build my project with gulp and use browserify. To make path resolution easier i configurated browserify var b = browserify('./app', {paths: ['./node_modules','./src/js']}); The problem is that WebStorm IDE don't know about this and doesn't help me with intellisense when i require files. For example intellisense does't work on the...

Show `.map` files under their respectives files in WebStorm/IntelliJ

Using Filewatchers it's possible to show a generated file under it's respective source file: The problem I am having is that only the generated .jsfile is 'watched' and grouped whilst the .map file still shows up separately. Is there a way to set it up so that both files are...

How to make the generated HTML file auto-indent in WebStorm 10

I'm using WebStorm 10 with Jade. The generated HTML is not auto-indent, for e.g: index.jade: extends layout block content h1= title p Welcome to #{title} index.html <!DOCTYPE html><html><head><title></title><link rel="stylesheet" href="/stylesheets/style.css"></head><body><h1></h1><p>Welcome to </p></body></html> Is there a way to auto-indent the generated HTML ?...

common license for intelliJ and WebStorm

is that possible to have a common license for both intelliJ and WebStorm IDEs? I know these are separate products, but I couldn't finy any information whether the license can be combined or not. My company do have intelliJ already, but we need WebStorm.

Is it possible to hide JavaScript framework call stacks when debugging, only step over application JavaScript code

I'm fairly new to JavaScript, but got assigned working on a front-end project written in a mvc frontend framework, every time when I try to debug the code base to better understand the application logic, I got suck in to the framework code, for now, I dont really wanna dig...

Should I configure a watcher for less files in a meteor project

I'm setting up a meteor project in Webstorm and so I added less, and converted my .css file to .less. Webstorm sees that this is a .less file and prompts me to add a watcher. Given that this is a meteor project, is it necessary to add the watcher or...

JQuery DefinitelyTyped, typescript 1.4 and Webstorm error highlight

I update my jquery.d.ts definition file from https://github.com/borisyankov/DefinitelyTyped/blob/master/jquery/jquery.d.ts but it generate a lot of error if I open it inside WebStorm IDE. I found on internet that may be WebStorm compiler couldn't be up-to-date so I went on "Preference"->"Languages&Framework"->"Javascript"->"Node.js and NPM" and I update the typescript package to 1.4.1 but...

WebStorm - Jasmine jQuery

I'm quite new to the usage of WebStorm, but it's not working as epected. I had a project in the past, but now I try to recreate it and try to unit test my code. I'm very new to unit testing JavaScript code. So, I have a file karma.conf.js which...

'require' keyword not being recognized by webstorm

I'm using WebStorm as the IDE. Here's my folder structure and express.js insalled: But my sample code is not aware of the require keyword: var express = require('express'); var app = express(); app.listen(1337, function(){ console.log("ready"); }); Update Per Darin's answer Here's my package.json file which now sits in the root...

Custom surround template

How can I define my own custom surround template that I can use to wrap around a selection of javascript code followed by reformat. I've used Alt + Cmd + T to bring up this option panel....

How do I configure Webstorm 10 to run npm install --force before debugging?

I have a shared submodule that requires me to run "npm install --force" before I can run webstorm and debug the application. I would really like to edit my debug configuration to have a before launch action that will run the npm command for me. Can this be done?

I just created an HTML 5 Boilerplate project in WebStorm. Is there a standard command for compiling the “dist” folder?

I'm getting started with WebStorm 9. I created an HTML 5 Boilerplate project and I noticed a src and a dist folder. Is there a standard command to compile the content of the src folder into the dist folder? This is how my project looks like: ...

image in .ejs not showing when using WebStorm

I'm using Webstorm to create a page and I can't get images to show when rendering .ejs. Here is my code: test.js http = require('http') express = require('express') app = express() app.engine('.ejs', require('ejs').__express) var port = process.env.PORT ? process.env.PORT : 3000 http.createServer(app).listen(port, null, null, function(){ console.log('Listening to port ' +...

How do I remove the “stripe marks” from navigation bar and project window?

I use a handlebars plugin to be used with requirejs in my project. This makes Webstorm report an error if I require a template using the plugin-specific syntax: var template = require('hbs!./sometemplate.hbs'); This is fine; I can easily control how the editor should present this error in my javascript file....

Boiler plate code for webstorm angular js

Is there any boiler plate code available for angularJs that I can use with webstorm for speedy development. Bascially i am looking for code snippets to quickly create controllers, services, directives etc. I think sublime provides that feature, but not sure if we can do that in webstorm or not....

Does JetBrains Webstorm have a keyboard shortcut for copying the current function?

In JetBrains Webstorm I would like to have a keyboard shortcut that copies the entirety of the Javascript function my cursor is currently within. Does it support such functionality?

Search file names that contain a string

I have a module named flume and file names that include that module name, like flumeIndexController, flumePlugin etc. Now I've decided to rename the module to oozie so I want to have these files renamed to include new module's name like oozieIndexController, ooziePlugin. How can I get a list of...

Visual Studio MVC and WebStorm working together and minimizing assets

I'm developing a SPA application in VS. I have separated html (angularjs) and webapi services. I develop html pages and css in WebStorm (which is perfect for the job) and VS for webapi (WebStorm and VS project folders are the same). Everything works fine but I want to minimize html...

IntelliJ/Webstorm not finding import reference

I have the following project structure: root src scripts main.js foo.js Inside of my main.js file, I'm importing foo.js like so: import 'src/scripts/foo.js' When I click on the import statement above and go to Navigate -> Declaration I get a super helpful message that says Cannot find declaration to go....

Language level inconsistency between Android Studio and WebStorm

Currently working with Google Backend APIs again and I tend to switch between Android Studio and WebStorm for proper syntax in both Java and HTML. This works flawlessly, except for one thing. Each time I even look at the code through any of the mentioned programs, the modules language level...

WebStorm: Client and Server at same port

I am new in WebStorm. I have got a sample application that consist two projects: client(angularJs) and server (node.js). When I start server app.js (api that return json), it listening port 7200 Wnen start client (AngularJS app) index.html, it works on port 63342 But the api call from client to...

[WebStorm]: Change Debugging WebServer Project Root

Since recently, I've been using JetBrains WebStorm and I absolutely love it, but I do have an issue, and after hours of searching here and in the documentation, I decided to open my own question because I just don't find it. I do have a project which is stored on...

Declaration merging and aliasing not working together

I recently started converting my node.js/express application to typescript. It is working great so far, but there are some things I am not sure of: I noticed that in the sample project by Microsoft, they are inconsistent with their typing. app.ts app.get('/findImages', function(req, res) { // ... } routes/index.ts export...

Webstorm localhost from mobile

I can't access my Webstrom localhost on port 63342 from mobile. I opened the port in Windows firewall and ESET (but port online checkers say me that the port still close). I checked option "Can accept external connections" in Webstorm (but it caused message that Built-in HTTP server on...

Webstorm helper for requiring module

I'm looking for a way to require module easily with Webstorm (shortcut, plugin, intention, ...). Here is my use case : Given my cursor located at the end of a unknown variable myVar somewhere in my JS file. When I press a shortcut, I jump at the top of the...

How to create a NodeJS + LoopBack Application using WebStorm?

I am using WebStorm v 9.0.3. I would like to create a Strongloop/Loopback Application + NodeJS Application. Is there a way to create it directly through WebStorm IDE or should we manually do it using commandline. Currently I can see only NodeJS Express App provision during project creation in WebStorm....

WebStorm after reformat code - what is this?

This is my HTML structure: <ul class="list-unstyled"> <li><a href="#">Superga</a></li> <li><a href="#">Nike</a></li> <li><a href="#">New Balance</a></li> <li><a href="#">Birkenstock</a></li> <li><a href="#">Havaianas</a></li> <li><a href="#">Punto</a></li> <li><a href="#">Marjin</a></li> <li><a href="#">Puma</a></li>...

IntelliJ(WebStorm) Mongo Explorer doesn't work

I'm trying to use Mongo Explorer plugin on WebStorm, but it doesn't work. I added mongo executable pass and server's path from Preferences dialog. It shows the server, but it doesn't show the contents below the server. Why? ...

Error: Unexpected request: POST Karma-jasmine-angular

the actual scenario is like when I am trying to test my angular js controller and service together in which first I call a get ajax request and on its success I call a user service which also contains a post ajax request. When I run test I got the...

Using TypeScript type definitions with Webstorm 10 [duplicate]

This question already has an answer here: intellisense and code complete for DefinitelyTyped (TypeScript type definitions) on WebStorm IDE 2 answers I am trying to use Webstorm 10's new built-in TypeScript compiler. When compiling a simple Node.js file such as below, it gives a TS compilation error of "Error:(1,...

Braces placement in object definition in PhpStorm

Is there any way to make PhpStorm place curly brackets on new line in this situation? var test = { '*': { // something } } instead of making this (after reformatting): var test = { '*': { // something } } ...

How to tell WebStorm to only preview file by single click, not create a tab?

By default, clicking on file name in Project View panel will create new editor tab in WebStorm, which is annoying. At the same time in Sublime only double click on file name will create it. How can I achieve the same behaviour in WebStorm?...

How can I find obsolete “noinspection” annotations?

I just went through a project and resolved all code hints WebStorm provided. For most of these, that meant adding a noinspection comment, because either WebStorm was unable to understand the code, but the code is legit there is a bug in WebStorm I reported the bugs and am now...

Shortcut to create automatic tags for JS and CSS files in my project in WebStorm

WebStorm is packed with nice features and shorcuts, but I'm not able to find a quick way to add JavaScript or CSS file to my HTML page. I have a new project, I create a file index.html and a script.js (or it can be a library I downloaded or a...

WebStorm Marking Files as Invalid when using Require

I' using the latest release version of webstorm (9.03) and most of my JavaScript files show up as invalid. I'm showing the code below. 'use strict'; function SpeakerDetailsController (speaker, CONFIG, $sce, $scope) { this.speaker = speaker; this.showSessions = CONFIG.showSessions === 'True'; $scope.someSafeContent = $sce.trustAsHtml("<i>Hello</i> <b>World!</b>"); } SpeakerDetailsController.$inject = ['speaker', 'CONFIG',...

Intellij - Hide file paths from Favorites window

I organized my project files in the Favourites window according to the programming language e.g. python, javascript etc. However, the path to each file takes a lot of space and requires you to horizontaly scroll the window. Is there a way to hide path from the Favourites, so only file...

typescript unable to add definition files to webstorm

i want to use baconjs with TS,but after copy baconjs def file for ts,i got that msg: bacon.ts(216,1): error TS1148: Cannot compile external modules unless the '--module' flag is provided. to solve that,i should add a file watcher with --module cmd for tsc,but i cannot find how to distinguish between...

Custom syntax highlighting for content of