Open johnkors opened 8 years ago
I get this error as well when using the NpmHelper ( http://fsharp.github.io/FAKE/apidocs/fake-npmhelper.html ) and executing npm run
do you mean when you run npm run
from the command line?
Ah, no. When running the FAKE script via build.cmd web
.
Is this in use, btw?
https://github.com/fsharp/FAKE/blob/master/src/app/FakeLib/NpmHelper.fs#L28
It doesn't seem to be in use, no :). Probably something I forgot to remove before I submitted that PR. I'll try to build the project locally.
Something to do with this?
C:\code\frontend\FAKESimpleDemo\src\FAKESimple.Web\node_modules\.bin (master)
λ gulp
'node' is not recognized as an internal or external command,
operable program or batch file.
it looks like even though the initial node.exe
from the right place is used, it looks like gulp refers to the global version. Maybe the path to node.exe
must be added to the path environment variable when you run it. Good catch though. Please fix if you're working on it, otherwise I'll do it when I have time :).
Yeah, might have to add node.exe to PATH at the time of install via NuGet (in the build.cmd
). Not sure if it will be able to resolve it from PATH immediately, though..
I think it is better to add it temporarily when you run the command just for that process. Otherwise you might end up corrupt an existing installation of node, which you might want to have.
On Tue, Jan 12, 2016 at 12:31 PM, John Korsnes notifications@github.com wrote:
Yeah, might have to add node.exe to PATH at the time of install via NuGet (in the build.cmd). Not sure if it will be able to resolve it from PATH immediately, though..
— Reply to this email directly or view it on GitHub https://github.com/mastoj/FAKESimpleDemo/issues/1#issuecomment-170883180 .
in the lines of?
NuGet.exe "Install" "Node.js" "-OutputDirectory" "packages" "-ExcludeVersion"
SET NodeJsPath=%~dp0packages\Node.js
SET PATH=%PATH%;%NodeJsPath%
That seemed to solve it. Now gulp is able to get node using the Nugetly installed version of Node :)
Awesome, I wonder what is the best version to solve that issue... it's more a problem with node/npm and how some packages internally do a new call to node that's in the path for some reason.
On Tue, Jan 12, 2016 at 12:59 PM, John Korsnes notifications@github.com wrote:
That seemed to solve it. Now gulp is able to get node using the Nugetly installed version of Node :)
— Reply to this email directly or view it on GitHub https://github.com/mastoj/FAKESimpleDemo/issues/1#issuecomment-170890414 .
Executing
build.cmd web.
, I get this error ((I have no global node installed)