Closed isochronous closed 10 years ago
This may be similar to #2, as when I look at the gulp.cmd
file installed by the package, the path to node seem to be invalid:
@echo off
\nodejs\node ..\packages\Ncapsulate.Gulp.3.6.2.1\nodejs\node_modules\gulp\bin\gulp --no-color %*
@echo on
The node.cmd
file, however, has the correct path:
@echo off
..\packages\Ncapsulate.Node.0.10.26.3\nodejs\node %*
@echo on
And once I fixed the bad path to node in gulp.cmd
, my <Gulp Tasks="build" />
command started working.
Those errors sound like an outdated powershell (2.0). I'm running Powershell 3.0 so I never noticed that issue.
If possible you could try upgrading to Powershell 3 (I understand this isn't ideal), alternatively I can look into an alternate way of identifying the node package directory in https://github.com/Blacklite/Ncapsulate/blob/master/Ncapsulate.Gulp/tools/install.ps1
I have a feeling the culprit is this line $nodePath = (Get-ChildItem "$installPath\..\Ncapsulate.Node.*" | Sort-Object Name -descending)[0]. FullName;
Essentially what we're trying to do is find the latest Ncapsulate.Node directory, and get it's full name.
I can see later tonight if I have a moment to figure out another way to rewrite that statement to work with powershell 2.0.
Right now I have hungry kids to feed!
I just did a quick test, I can convert $nodePath = (Get-ChildItem "$installPath\..\Ncapsulate.Node.*" | Sort-Object Name -descending)[0].FullName;
=> $nodePath = (Get-ChildItem "$installPath\..\Ncapsulate.Node.*" | Sort-Object Name -descending).FullName;
After that things magically start to work in Powershell 2.0 and it works for Powershell 3 and 4 as well.
As a side note you can run different versions of powershell using the -version
command, the more you know!
I'll see if I can get this sometime tonight.
Awesome! I didn't even realize there was a new version of powershell to use - I'll do that ASAP. In the meantime, if you could make that change and update the nuget packages, it would be a HUGE help to my team!
Change is up, let me know if you or your team has any more problems!
Will do, thanks so much!
-----Original Message----- From: "David Driscoll" notifications@github.com Sent: 5/27/2014 10:46 PM To: "Blacklite/Ncapsulate" Ncapsulate@noreply.github.com Cc: "Jeremy McLeod" isochronous@gmail.com Subject: Re: [Ncapsulate] Gulp package generates errors running install script(#3)
Change is up, let me know if you or your team has any more problems! — Reply to this email directly or view it on GitHub.
This works perfectly. Thanks again!
Okay, basic details first: This is on Windows Server 2008 R2, using Visual Studio 2013 Professional Update 2, nuget 2.8.50313.46, and I've cleared my nuget package cache. I have the node toolkit for VS2013 installed, as well as the regular old node x64 installer from nodejs.org (with both node and npm on the system path).
The problem occurs when trying to install the Ncapsulate Gulp and Node packages. If I try installing Gulp directly, without installing Ncapsulate.Node first, the install succeeds but I get four errors in the package manager console:
If instead I install Ncapsulate.Node via nuget before installing Ncapsulate.Gulp, it installs with one error:
And then installing Ncapsulate.Gulp still produces four errors:
And finally, the results of all of this. Basically, the node package seems to work fine (at least,
npm install
is being called, as I can see the task output in the output panel), but the gulp task runner does not - I neither see output nor do the files the task should generate ever appear in the destination folder.Just in case, here's my gulp.targets file:
And my node.targets file is absolutely stock:
Honestly, this package is AWESOME, and I really want to use it to its full potential, but right now I have no idea what's going wrong or how to go about fixing it.