Disable TypeScript notifications from Gulp in Visual Studio 2015 - node.js

I just did an npm update on my Aurelia CLI project, and now I'm suddenly getting Toast notifications from Gulp for TypeScript compilation errors in Visual Studio 2015, which is really, really annoying.
Can anyone provide guidance on how to switch this off? Also, does anyone know of any recent changes to Node packages that would cause this behaviour to start happening?

The compilation is disabled by opening the .csproj file for the project and add the following line, right after the TypeScriptToolsVersion element:
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
UPDATE:
In RC2, you can disable it by adding TypeScriptCompileBlocked to the .xproj file.
<PropertyGroup>
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
</PropertyGroup>

To remove this you would want to modify your transpile.js file to remove gulp notify - you would do this here:
https://github.com/aurelia/cli/blob/3c5ea5f935e523d1cec5ead884391d6b008deee5/lib/resources/tasks/transpile.js#L22
If someone is coming later to look for the same thing from a skeleton it is here in build/tasks/build.js -
https://github.com/aurelia/skeleton-navigation/blob/master/skeleton-typescript/build/tasks/build.js#L26
I remove this on my TypeScript problems because it emits too many issues when refactoring code.

Related

Native Spinner Dialog (IONIC 3)

I've already used the native spinner in some older projects before and it's worked fine. However, I recently started a new IONIC's project (V.3.5.3) and It's not working properly or I'm doing something wrong. I also noticed that Ionic's Team has changed its Native Spinner Plugin recently, but I don't think that's the problem.
Every time I call show funcion:
this.spinnerDialog.show()
It returns:
WARN: Native: tried calling SpinnerDialog.show, but the SpinnerDialog plugin is not installed.
WARN: Install the SpinnerDialog plugin: 'ionic plugin add cordova-plugin-native-spinner'
And yes, the plugin is already included in app.module.ts in providers part.
And yes, the commands to include the plugin were executed:
ionic cordova plugin add cordova-plugin-native-spinner
npm install --save #ionic-native/spinner-dialog
Could anyone help me please?
It's a bug, do this while we wait for the fix:
edit
project/node_modules/#ionic_native/spinner-dialog/index.js
Change line 84 to this
pluginRef: 'SpinnerDialog'
It's a temp fix that will work.

ESLint does not work in VSCode

I have a global install of ESLint via npm. I can successfully lint a file from the command line, but not from within VS Code. I have followed the instructions to use ESLint within Visual Studio Code, but it fails to work. I do have an eslintrc file. I have also uninstalled and reinstalled eslint a number of times.
VS Code does not produce any error message, it just does not lint the file. I was able to use JSHint very easily, but even though the ESLint installation seems similar, it just does not work. I am just a student, and don't know what other details may be helpful. I'm happy to provide any additional information needed.

Gulp warnings getting started with JointsWP

I discovered JointsWP starter theme which looks promising.
However, I'm having troubles getting started with the sass version which I would like to use.
I did a fresh installation of wordpress, and installed the jointswp theme.
When I do npm install, it installs the dependencies.
But when I do 'gulp', I get a bunch of warnings.
Doing gulp watch and gulp styles seems to work but doing gulp vendor-js gives a "Too many errors. (67% scanned)." reply.
When I install a fresh copy of foundation 6 and use the foundation-cli, I have no problems what so ever.
Does anyone know what might be causing this?
Image of errors
Sorry for the slow response.
Those errors are normal - they're actually warnings. Your code will compile fine.
It looks like JSLint has some "issues" with how some of the Foundation JavaScript is implemented.

Node Tools for Visual Studio Mocha tests not finding Mocha module

I have a node project which I've imported into Visual Studio from Web Storm. The mocha tests run fine in Web Storm but in Visual Studio they don't run at all. I've set the test framework on the relevant files and the test discovery phase correctly locates them. When I run the tests they get a green tick even if I modify the system such that they must fail. If I click on the output for a test then I see the error:
NTVS_ERROR: Failed to find Mocha package. Mocha must be installed in
the project locally...
I have installed Mocha locally, uninstalled and re-installed but with no difference.
I've managed to get some more specific error information by editing the mocha.js file to print out what's going wrong. The problem occurs during the detectMocha function. The exception that I get in the log now is:
[Error: Cannot find module
'C:\projects\FastLaneVS"\node_modules\mocha'] code: 'MODULE_NOT_FOUND'
Now my assumption is that this extra double quote after my project directory is the problem. I've gone back to the run_tests.js and printed out the argv array to see where the project directory is coming from and indeed it's already appended by the time that function is called.
Now I'm happy to accept that I've done something and added this quote somewhere but I can't find it. I also don't understand why the find_tests should work since that calls the same method and passes the Project Directory in correctly.
In my project it's directory is listed just as . and I've checked both the sln and nsproj files in notepad++ to try and find a spurious double quote.
I'm using VS pro 2013 update 4 with node tools 1.0.21029.05
I could modify the mocha runner to trim a trailing double quote but any ideas on how I can correctly fix this would be great.

How to use nodemon in NTVS(Node Tools for Visual Studio)

I was working with Node on Visual Studio Professional 13, and I soon realized that restarting my server for every change in code was becoming a hassle.
So I did some research and discovered that most people used the nodemon to automatically refresh their server. Although the tutorials online used command line to install and run their server with nodemon when I used VS's interface to generate my express project and download nodemon.
My problem is that when I run my server, the server doesnt restart when I update my code. My question is how can run my server through nodemon if I am coding my project using VS
this link also shows people with the same question as me, but the solution in it isn't that clear
https://nodejstools.codeplex.com/workitem/545
the following works for me:
open your Project Properties ("PROJECT" > "YourApp Properties...")
point the "Node.exe path" to nodemon.cmd (click on the button right
of the input field, enter "%AppData%\npm\" in the adress bar, show
all files, select "nodemon.cmd", save the properties form)
start debugger, or use "start without debugging" (Ctrl+F5)
The accepted answer didn't work for me, as there was no nodemon.cmd file in my Nodemon installation. Perhaps things have changed.
This did work, however:
In the project properties, I simply set the Node.exe options to "C:\Program Files (x86)\nodejs\node_modules\nodemon\bin\nodemon.js" server.js
Note that my TypeScript file is server.ts, but I used the compiled filename server.js in the Node.exe options.
Try to use last version of NTVS(Node Tools for Visual Studio).
Now when I run app in debug and change some code server restart and apply changes.
It's amazing in new version!

Resources