FAQ Database Discussion Community


Typescript and webstorm, missing --module flag

javascript,typescript,webstorm
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...

How to completely uninstall webstorm on ubuntu [closed]

linux,ubuntu,ubuntu-14.04,webstorm
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?

Boiler plate code for webstorm angular js

angularjs,webstorm
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....

How can I find obsolete “noinspection” annotations?

webstorm
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...

Error: Unexpected request: POST Karma-jasmine-angular

angularjs,unit-testing,jasmine,webstorm,karma-jasmine
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...

IntelliJ(WebStorm) Mongo Explorer doesn't work

mongodb,intellij-idea,webstorm
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? ...

How to Debug Ionic WebApp?

ionic-framework,webstorm,ionic
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?...

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

javascript,css,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...

Code styling without modifying the binaries

intellij-idea,webstorm,intellij-13,intellij-plugin
On the WebStorm for example and I believe in any Intellij product. You can easily refeactor the code and style it as you like from the setting 'Code Style'. But, the styling and refactoring actually change the binaries of the file. for example if you decide you want new line...

Confusion of WebStorm type recognition of function return types

javascript,webstorm,jsdoc
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);...

Browserify paths and Webstorm configuration

javascript,npm,webstorm,browserify
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...

Stylesheets not showing up for Ionic App

css,angularjs,webstorm,ionic
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...

How to use PyCharm and WebStorm in the same editor

intellij-idea,reactjs,pycharm,webstorm
I'm working on a project involving python and javascript (react). I would like to know if someone knows a way to use pycharm and webstorm in the same editor or if there is a plugin to add react support to PyCharm. Thanks for your help....

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

ruby,node.js,gruntjs,webstorm,compass
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...

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

node.js,npm,webstorm
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?

Shortcut to move the cursor to certain characters in Webstorm

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...

Declaration merging and aliasing not working together

node.js,express,intellij-idea,typescript,webstorm
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...

image in .ejs not showing when using WebStorm

javascript,node.js,image,webstorm,ejs
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 ' +...

Jade language injection in Webstorm

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...

'require' keyword not being recognized by webstorm

node.js,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...

typescript unable to add definition files to webstorm

typescript,webstorm,file-watcher
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...

WebStorm 10, issue with terminal on Windows 10

webstorm,windows-10
I decided to try Windows 10, but having problem to make terminal works inside WebStorm. When I open terminal, sometimes it's completely black, sometimes it loads project folder but I cannot type there. There is a way to run it in the external window, but I just got accustomed to...

Webstorm not ignoring directories marked “excluded”

extjs,webstorm
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...

Webstorm IDE: Live Template - Accessing the project name

webstorm,live-templates
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...

Intellij - Hide file paths from Favorites window

intellij-idea,phpstorm,pycharm,webstorm
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...

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

javascript,enums,typescript,webstorm,object-literal
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...

WebStorm Marking Files as Invalid when using Require

webstorm,jetbrains
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',...

Webstorm special character encoding

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

Webstorm helper for requiring module

webstorm,commonjs
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...

Dust file doesn't open in Webstorm IDE 8.0.5

webstorm,dust.js
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...

Make Webstorm highlight .txt files as HTML

syntax-highlighting,webstorm
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 - Jasmine jQuery

jquery,unit-testing,karma-runner,webstorm,karma-jasmine
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...

Webstorm SystemJS import resolve error

javascript,webstorm,ecmascript-6,systemjs
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';...

Yeoman generator code highlight for webstorm

webstorm,yeoman-generator
I am creating yeoman generator and i came accross problem with code inspection in webstorm. Here is my code: module.exports = function(grunt) { grunt.initConfig({ // Process main less file to css file in build folder less: { <% if (includeBootstrap) { %> i get syntax error near <% and the...

JQuery DefinitelyTyped, typescript 1.4 and Webstorm error highlight

javascript,jquery,webstorm,definitelytyped,typescript1.4
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...

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

angularjs,intellij-idea,typescript,webstorm,grunt-ts
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":...

WebStorm after reformat code - what is this?

performance,webstorm,reformat
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>...

WebStorm: Disabling language injection coloring

webstorm
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....

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

intellij-idea,webstorm,file-watcher
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...

Braces placement in object definition in PhpStorm

javascript,phpstorm,webstorm,code-formatting
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 } } ...

Prevent webstorm watcher from running on checkout new branch

webstorm
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.

Angular parameter types on jsdoc

angularjs,ide,phpstorm,webstorm,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...

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

ide,webstorm
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....

WebStorm not tabbing correctly on a single file

javascript,ide,webstorm
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: Client and Server at same port

angularjs,node.js,webstorm
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...

Group files in Webstorm / IntelllijIDEA

intellij-idea,webstorm
Is it possible to group related items in Webstorm same way as in Visual Studio (Group files in Visual Studio)?

Unresolved property variable when returned from method

javascript,angularjs,variables,intellij-idea,webstorm
... 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...

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

meteor,less,webstorm
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...

How to perform grunt remote debug in IntelliJ IDEA?

google-chrome,intellij-idea,gruntjs,typescript,webstorm
I build and run my typescript application by Grunt and connect(grunt-contrib-connect) and livereload plugins. While grunt compile .ts files, it also generate sourcemap. My application is oppening on google chrome. How can I remotely connect by Intellij Idea to this application that was run by Grunt and oppened in Chrome...

Using TypeScript type definitions with Webstorm 10 [duplicate]

node.js,typescript,webstorm
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,...

getter/setter on a module in TypeScript

typescript,webstorm,typescript1.4
I am using AMD modules (compiler flag "--module amd") in my TypeScript project. While I can easily use getters/setters on my classes I would like to do the same on my modules but export get abc() : string { return "abc"; } returns error TS1008: Unexpected token; 'module, class, interface,...

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

javascript,webstorm
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?

Refactor angular module name in Webstorm

angularjs,intellij-idea,refactoring,webstorm
Is there a possibility or trick to rename an angular module in Webstorm with refactoring in the whole project? 'Cause when I have something like this angular.module('my-module', []); and my caret is on the 'my-module' string, I cannot refactor the module name. Is there an appropriate place (or plugin) to...

Visual Studio MVC and WebStorm working together and minimizing assets

angularjs,visual-studio-2013,single-page-application,minify,webstorm
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...

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

linux,phpstorm,webstorm
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?

git,version-control,intellij-idea,webstorm,jetbrains
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...

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

javascript,debugging,webstorm
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...

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

html5,webstorm,html5boilerplate
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: ...

How to create a NodeJS + LoopBack Application using WebStorm?

node.js,webstorm,loopbackjs
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]: Change Debugging WebServer Project Root

webstorm
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...

Node Express.js 4 Route Not working, Getting 404

javascript,node.js,express,webstorm
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...

Webstorm localhost from mobile

mobile,localhost,port,webstorm
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...

TypeScript problems in webstorm using the “import” statement

typescript,webstorm
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 ->...

How to get intellisense for Bootstrap 3?

html5,css3,twitter-bootstrap,webstorm
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?...

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

webstorm
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?...

Running jest tests directly in Intellij Idea/WebStorm?

unit-testing,intellij-idea,reactjs,webstorm,jestjs
I'm using jest to write tests in my ReactJS application. So far, to run my test suite, I need to type 'npm test'. Here's the snippet from package.npm: "scripts": { "test": "./node_modules/.bin/jest", (other stuff) }, "jest": { "unmockedModulePathPatterns": ["<rootDir>/node_modules/react"], "scriptPreprocessor": "<rootDir>/node_modules/babel-jest", "testFileExtensions": [ "es6", "js" ], "moduleFileExtensions": [ "js", "json",...

WebStorm: Hide html selector toolbar

ide,webstorm
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... ...

Language level inconsistency between Android Studio and WebStorm

java,android,android-studio,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: How can I link the HTML to an installed JS library?

javascript,jquery,html,webstorm
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?...

Custom syntax highlighting for content of