Tag: visual studio

针对Visual Studio的Node.js工具始终停止exception

所以我一直在使用Visual Studio的Node.js工具( https://nodejstools.codeplex.com )。 我有这个反复出现的问题,它总是会在出现exception时开始debugging。 这可能听起来像是一件好事, 但是当exception应该被抓住的时候不是这样。 以此为例(这是来自bson模块) try { // Load the precompiled win32 binary if(process.platform == "win32" && process.arch == "x64") { bson = require('./win32/x64/bson'); } else if(process.platform == "win32" && process.arch == "ia32") { bson = require('./win32/ia32/bson'); } else { bson = require('../build/Release/bson'); } } catch(err) { console.error("Failed to load c++ bson […]

nodejs:找不到模块“护照”

我在探索Node.js的开始时错过了相当基本的东西。 我正在尝试使用passportjs身份validation来构build一个小应用程序。 我在我的app.ts有以下行: import passport = require("passport"); 和下面的我的package.json: { "name": "ftct", "version": "0.0.0", "description": "ftct", "main": "app.js", "author": { "name": "Mark.Norgate", "email": "" }, "dependencies": { "express": "3.4.4", "jade": "*", "passport": "^0.3.2", "stylus": "*" } } 但是,Visual Studio 2015抱怨: Build: Cannot find module 'passport'. 我错过了什么? 我已经阅读了一些关于passportjs的文档,但是到目前为止还没有看到什么问题。

如何在Visual Studio 2012中打开njsproj项目

当我在Visual Studio 2012中打开njsproj项目时,它提供了一个错误不兼容的项目

Visual Studio发布button被禁用?

我在Visual Studio中创build了一个Node.js项目,现在我想将它发布到Azure,所以我遵循以下指南: https : //github.com/Microsoft/nodejstools/wiki/Publish-to-Azure-Website-using织网,部署#转换到一个-Azure的项目types 但是,当我右键点击项目或顶部的生成菜单的发布button,button被禁用。 有任何想法吗?

build立:找不到模块OurFirstAppWithFVisualStudio.module.scss

我正在使用NodeJS工具为Visual Studio构build一个SPF应用程序,如下所示: https://github.com/SharePoint/sp-dev-docs/wiki/Working-with-visual-studio 但是在做完所有步骤之后,我有这个错误 严重级代码说明项目文件行抑制状态错误构build:找不到模块“./OurFirstAppWithFVisualStudio.module.scss”。 NodejsApp1 E:\ GoogleDrive \ Labs \ SPF \ OurFirstSPFAppWithVisualStudio \ src \ webparts \ ourFirstAppWithFVisualStudio \ OurFirstAppWithFVisualStudioWebPart.ts 8 当我检查解决scheme时,我注意到.scss文件被排除在解决scheme之外,所以我的第一个操作是将其包含在项目中。 但是,这没有任何影响。

依赖关系 – 没有安装错误(npm WARN可选SKIPPING可选依赖:fsevents@^1.0.0(node_modules \ chokidar \ node_modules \ fsevents)

我想让webpack在Visual Studio中工作,但不断得到Dependencies – not installed问题。 我在输出中得到这个错误: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) 我已经阅读了这篇文章和Scott Hanselman的解决scheme。 即我已经安装了最新的节点(7.0.0)+ npm(3.10.8),并设置Visual Studio使用我的节点安装(这是definietely使用,因为我看到这在输出: "C:\Program Files\nodejs\npm.CMD" install )。 所以我遵循这一切,但事情是:我仍然在Visual Studio中得到这个愚蠢的not installed警告。 我做错了什么,或者是在其中一个版本中工作,但不能用最新的节点和nmp工作?

为什么createServer()被认为不是一个函数?

我安装了快递全球和npm安装了我的快递应用程序,但intellisence或应用程序都没有工作(我在Mac OS Yosemite上使用Visual Studio代码)。 这里是一个示例代码: /// <reference path="typings/node/node.d.ts" /> /// <reference path="typings/express/express.d.ts" /> var express = require('express'); var app = express.createServer(); app.get('/', function (req, res) { res.send('hi'); }) app.listen(8000); 这里是我得到的错误: Abeds-MacBook-Pro:myNode AZ$ node twitter.js /Users/AZ/Desktop/myNode/twitter.js:5 var app = express.createServer(); ^ TypeError: express.createServer is not a function at Object.<anonymous> (/Users/AZ/Desktop/myNode/twitter.js:5:19) at Module._compile (module.js:397:26) at Object.Module._extensions..js (module.js:404:10) […]

javascript / node.js在visual studio 2013中的智能感知/ resharper有问题

Visual Studio 2013与: Resharper 8.2 Node.js工具 networking要领 从我从node.js工具网站收集到的信息,我应该能够获得智能感知。 然而,当在node.js项目中编辑javascript时,我得到了一个奇怪的智能感知,它暗示着各种不相关的东西。 它没有任何有用的intellisense为节点,像autocompletes require required ,这是非常烦人的,因为我必须点击逃生来阻止它改变它,我有时会错过它,这会导致运行时错误。 它为我在项目中的自己的代码提供了智能感知,但是却很less。 我读了这个,有一些希望: https://nodejstools.codeplex.com/workitem/562 但是,如果我禁用JSR文件的Resharper intellisense,而不是它推迟到Visual Studio / node.js工具,我根本没有任何intellisense。 我现在正在做这件事,因为没有什么比有required问题更好。 在Google或StackOverflow中找不到有用的东西。

Node.js – 我真的需要Visual Studio吗? 和Python 2.X或3.X?

试图在windows Node.js上安装websockets 我得到的本地扩展需要Visual Studio和Python。 我的问题是:是否有可能采取另一个编译器? 或者我真的需要VS(3,6GB)下载或有替代品,因为我不想下载这么大的数额。 Linux有GGC,我想。 我是否需要Python 2.X或Python 3.X. 感谢您的答复。 祝你今天愉快。

什么是在Visual Studio 2017中设置gulp的正确方法?

我正努力在Visual Studio 2017中build立一个大嘴巴。我不确定我要去哪里错了,但有一些事情我很困惑,我真的找不到任何在线资源任何使用。 我正在使用的构build系统是CruiseControl.NET,我希望能够使用它。 这是我迄今为止所做的: 安装了Visual Studio 2017,并select了.NET Core cross-platform development和Node.js development (以及其他选项)。 创build了一个新项目 在项目中添加了一个gulpfile.js文件 用鼠标右键单击该文件,然后selectTask Runner Explorer 在任务运行资源pipe理器中,我得到错误Failed to load. See output window (Ctl+Alt+O) for more information. Failed to load. See output window (Ctl+Alt+O) for more information. 。 然后,如果我做了以下几点: 打开Node.js交互式窗口 运行命令.npm install –global gulp-cli closuresVisual Studio并再次打开它 在任务运行资源pipe理器,我然后得到消息(No tasks found) 。 首先,这是在Visual Studio 2017中设置Gulp的正确方法吗? 我问这个的原因是因为我不知道为什么我需要用句点字符(即.npm而不是npm […]