Tag: webstorm

WebStorm:NodeJS进程完成退出码0

我是NodeJS的新手,我从github上下载了我的项目并安装了所有必需的NodeJS模块。 并知道它只是显示 Webstorm控制台: 运行app.js Process finished with exit code 0 并停止应用程序。 为什么它停止。 我无法访问localhost:3000 。 您的指导将受到高度赞赏。 app.js var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var session = require('express-session'); var index = require('./routes/index'); var login = require('./routes/login'); var logout = […]

如何在WebStorm中debuggingReact Express Webpack应用程序

我试图debugging反应快递应用程序的后端。 我正在使用webpack捆绑。 如何在WebStorm上编辑configuration,以便我可以debugging前端和后端? 我正在使用WebStorm 2016。

在使用AngularJS发送GET请求时,无法从WebStorm IDE执行“打开”无效URL

我启用了CORS模块并在我的nodeJS服务器代码中设置了必需的选项。 我能够从我的浏览器发送GET请求到给定的URL并获得响应。 但是当我试图执行下面的代码发送一个GET请求使用WebStorm IDE的内置服务器的以下AngularJS代码时,我得到以下错误。 city name Delhi error SyntaxError: Failed to execute 'open' on 'XMLHttpRequest': Invalid URL 代码如下。 mainApp.controller('dController', function($scope,$http) { this.ccaid = { city:'', circle:'', area:'', }; this.getCircle=function(){ console.log('city name ' + this.ccaid.city); $http({ method: 'GET', crossDomain:true, url: 'xx.xxx.xx.xx:3000/fetchCityArea', params:{city:this.ccaid.city} }).then(function(success){ console.log('response ' + success); },function(error){ console.log('error ' + error); }); }; }); URL没有问题,但仍然无法发送GET请求。 […]

使用WebStormconfigurationbabel以使用带有WebStorm Node.js项目的ES6

您好,我正在使用WebStorm最新版本与Node.js(express.js)框架的工作。 我已经设置了我的babel以便我可以使用ES6语法(例如 import express from "express". Babel工作正常,它生成包含index.js.map的index.js。 问题是运行项目时,我仍然得到错误 /usr/local/Cellar/node/7.10.0/bin/node /Volumes/Elements/Learning/Node/Project/NodeWebStorm/bin/www /Volumes/Elements/Learning/Node/Project/NodeWebStorm/routes/index.js:1 (function (exports, require, module, __filename, __dirname) { import express from "express" ^^^^^^ SyntaxError: Unexpected token import at createScript (vm.js:53:10) at Object.runInThisContext (vm.js:95:10) at Module._compile (module.js:543:28) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at […]

WebStorm 7 – Yeoman Angular丢失的源映射`加载资源失败:服务器响应状态为404(Not Found)

使用WebStorm 7.0.1运行yeomanangular发生器grunt服务器抛出: Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/bower_components/jquery/jquery.js.map:0 Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/bower_components/angular/angular.js.map:0 Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9000/bower_components/bootstrap-sass/js/bootstrap-affix.js.map:0 Failed to load resource: the server responded with […]

build立Webstorm Jade

我给这个错误,但IDE有玉插件。 An exception occurred while executing watcher 'Jade'. Watcher has been disabled Fixit.: Invalid executable

ES6不被识别 – NodeJS和WebStorm

我一直在search和search,无法find答案。 我只是有点熟悉Typescript。 开始在我的GraphQL NodeJS服务器上工作,并希望使用Typescript来更安全,更简单的编码。 首先需要做的是将当前的JS版本设置为ES6,所以我做了。 另外我设置我的tsconfig方式: { "compilerOptions": { "module": "es6", "target": "es6", "noImplicitAny": false, "outDir": "./build", "sourceMap": true }, "exclude": [ "node_modules" ] } 我的index.js import * as express from 'express'; import * as graphqlHTTP from 'express-graphql'; import {Schema} from './src/schema/Schema'; const PORT = 3000; const app = express(); const graphqlOption: graphqlHTTP.OptionsObj = { […]

TypeScript:如何告诉WebStorm使用CommonJS而不是AMD

我正在使用WebStorm在TypeScript中构build一个Node.js应用程序。 当我编写“require”语句时,TypeScript编译器使用AMD。 我通过asynchronous模式输出js知道它。 我怎么能告诉WebStorm使用CommonJS呢?

WebStorm中的JavaScript代码风格显示未终止的语句警告

我在一个NodeJS项目上使用WebStorm 2016.1,似乎无法找出一些代码样式问题,保持触发警告。 例如,我得到这些灰色块,我没有用分号结束行,我不想这样做,因为这违背了项目的eslint设置。 我加上; 我得到一个eslint警告。 我需要改变什么设置来阻止它?

NodeJS JSON.parse(…)需要永久完成(在WebStorm的debugging器下)

编辑 这个问题似乎与WebStorm本身有关,它似乎不想处理包含大量嵌套对象的对象。 无论是想显示Watches窗口内的对象内容。 这个问题有点奇怪,因为我能够检查这个string,它的加载非常快。 看起来像一个WebStorm问题 我有一个相对较大的JSON文件4.9MB,我需要在NodeJS中处理,该文件存储在文件系统中,并使用以下代码行加载: var path = require('path'); var filename = path.join(__dirname, 'db_asci.json'); var fs = require('fs'); var content = fs.readFileSync(filename); debugger; var decycledObj = JSON.parse(content); debugger; 问题是在第一个debugger; 断点被击中,第二个不是,我等了20多分钟,什么也没有,一个处理器核心被加载到100%。 我无法debugging该function,因为它是本地的。 这里是JSON的ASCI版本 这里是UTF8版本的JSON 我究竟做错了什么?