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

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

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

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

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

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

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

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

html,jade,webstorm,auto-indent
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 ?...

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

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

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

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

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

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

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

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

node does not output using console log

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

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

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

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

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)?

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

karma-runner,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',...

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

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

Define same type for multiple variables, recognition in Webstorm

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

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

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

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

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?

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

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

common license for intelliJ and WebStorm

intellij-idea,ide,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.

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

Search file names that contain a string

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

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

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?

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.

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

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

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.

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

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

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

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

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

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

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

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

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

Custom syntax highlighting for content of