<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351683#M64501</link>
    <description>&lt;P&gt;Hi @Frobinson and @niketnilay,&lt;BR /&gt;
Is this issue fixed? If yes, what is the work around?&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 04:25:21 GMT</pubDate>
    <dc:creator>hwakonwalk</dc:creator>
    <dc:date>2017-03-29T04:25:21Z</dc:date>
    <item>
      <title>Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351681#M64499</link>
      <description>&lt;P&gt;I was trying to use Custom Visualization API to build my own custom visualization using tutorial from Splunk Docs (similar available on Splunk Dev also : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/AdvancedDev/CustomVizTutorial" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/AdvancedDev/CustomVizTutorial&lt;/A&gt; ).&lt;/P&gt;

&lt;P&gt;Following is the error I received while trying to build Custom Visualization on Windows System.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt; $SPLUNK_HOME/bin/splunk cmd node ./node_modules/webpack/bin/webpack.js

'$SPLUNK_HOME' is not recognized as an internal or external command,
operable program or batch file.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the error from npm-debug.log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;13 info lifecycle standin@1.0.0~build: Failed to exec build script
14 verbose stack Error: standin@1.0.0 build: `$SPLUNK_HOME/bin/splunk cmd node ./node_modules/webpack/bin/webpack.js`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I was not sure if it is picking my SPLUNK_HOME path set in Windows, or has it been written only to work on Linux/Mac systems.&lt;BR /&gt;
I have set both SPLUNK_HOME and $SPLUNK_HOME as the Splunk installation path on my machine(verified the same using echo command as below). &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;echo %$SPLUNK_HOME%
echo %SPLUNK_HOME%
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anyone confirm whether Custom Visualization worked on Windows machine? If yes, what mistake do you think I might be doing while initial setup?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:12:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351681#M64499</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T13:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351682#M64500</link>
      <description>&lt;P&gt;Hi @niketnilay,&lt;BR /&gt;
I've looked into your question with our engineering team and you are correct that there are differences when building custom visualizations on a Windows platform. We will need to research this further to get full details and update our documentation. In the meantime, posting here is a good option and I'll keep an eye on this thread to see what advice our community provides. &lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 22:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351682#M64500</guid>
      <dc:creator>frobinson_splun</dc:creator>
      <dc:date>2017-03-10T22:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351683#M64501</link>
      <description>&lt;P&gt;Hi @Frobinson and @niketnilay,&lt;BR /&gt;
Is this issue fixed? If yes, what is the work around?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 04:25:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351683#M64501</guid>
      <dc:creator>hwakonwalk</dc:creator>
      <dc:date>2017-03-29T04:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351684#M64502</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have the same issue on windows with Splunk 6.6.2. I found a way to get the result, which is:&lt;BR /&gt;
Add the path to splunk.exe to the windows Path environment variable (in my case C:\Program FIles\splunk\bin), and then run in the cmd window (as administrator), the line mentioned as raisng the problem (in your case, run splunk cmd node ./node_modules/webpack/bin/webpack.js from the same location). It did solve the issue on my windows laptop.&lt;BR /&gt;
Hope it helps&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 11:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351684#M64502</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2017-07-26T11:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351685#M64503</link>
      <description>&lt;P&gt;@poete, have you tried till the &lt;STRONG&gt;Rebuild Visualization&lt;/STRONG&gt; step?&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomVizTutorial#Rebuild_the_visualization"&gt;http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomVizTutorial#Rebuild_the_visualization&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 15:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351685#M64503</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-28T15:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351686#M64504</link>
      <description>&lt;P&gt;@frobinson, @hwakonwalk,&lt;/P&gt;

&lt;P&gt;I was able to build the visualization by changing &lt;STRONG&gt;SPLUNK_HOME&lt;/STRONG&gt; Windows &lt;CODE&gt;Environment Variable&lt;/CODE&gt; in &lt;CODE&gt;package.json&lt;/CODE&gt; from *NIX format (i.e. &lt;CODE&gt;$SPLUNK_HOME&lt;/CODE&gt;) to Windows (i.e. &lt;CODE&gt;%SPLUNK_HOME%&lt;/CODE&gt;).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  "scripts": {
    "build": "%SPLUNK_HOME%/bin/splunk cmd node ./node_modules/webpack/bin/webpack.js",
    "devbuild": "%SPLUNK_HOME%/bin/splunk cmd node ./node_modules/webpack/bin/webpack.js --progress",
    "watch": "%SPLUNK_HOME%/bin/splunk cmd node ./node_modules/webpack/bin/webpack.js -d --watch --progress"
  }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Only hiccup was that the &lt;CODE&gt;label "Radial Meter"&lt;/CODE&gt; set for Visualization got picked up as &lt;CODE&gt;$label&lt;/CODE&gt;, which I had to manually edit in Splunk UI from App Manager &amp;gt; Settings &amp;gt; Name.&lt;/P&gt;

&lt;P&gt;Please see if Dev team can verify and confirm the same.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2017 17:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351686#M64504</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-28T17:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351687#M64505</link>
      <description>&lt;P&gt;Of course I did, and as it did not work (and I think this is the subject of this post), I tried to figure out a way to make it work. Running the Rebuild Visualization step in verbose mode helped me to find the walk around I mentioned in my previous post. Of course ths is not a perfect solution, but at least I was able to build my Viz on windows.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 06:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351687#M64505</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2017-07-31T06:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351688#M64506</link>
      <description>&lt;P&gt;@poete, I tried the steps you had mentioned and also added the Path for exe as you mentioned. However, the build failed again.&lt;/P&gt;

&lt;P&gt;I have posted my changes to &lt;CODE&gt;package.json&lt;/CODE&gt; which would allow to build the visualization on Windows machine without changes to any other documented steps.&lt;/P&gt;

&lt;P&gt;The &lt;STRONG&gt;Environment Variable&lt;/STRONG&gt; in &lt;STRONG&gt;Windows&lt;/STRONG&gt; would be &lt;STRONG&gt;SPLUNK_HOME&lt;/STRONG&gt; and the same would be accessed in build script with &lt;STRONG&gt;%SPLUNK_HOME%&lt;/STRONG&gt; instead of &lt;CODE&gt;$SPLUNK_HOME&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 11:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351688#M64506</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-07-31T11:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351689#M64507</link>
      <description>&lt;P&gt;Hi Splunkers, &lt;/P&gt;

&lt;P&gt;Thanks for the question (and answers). You can also find information about the configuration differences for Windows and *NIX machines here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.2/Admin/DifferencesbetweenunixandwindowsinSplunkoperations"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.2/Admin/DifferencesbetweenunixandwindowsinSplunkoperations&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
Eve&lt;/P&gt;

&lt;P&gt;Eve Meelan &lt;BR /&gt;
Technical Writer&lt;BR /&gt;
Splunk &amp;gt;&lt;BR /&gt;
&lt;A href="mailto:emeelan@splunk.com"&gt;emeelan@splunk.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 17:06:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351689#M64507</guid>
      <dc:creator>emeelan_splunk</dc:creator>
      <dc:date>2017-07-31T17:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351690#M64508</link>
      <description>&lt;P&gt;Thanks @emeelan [Splunk], for providing the link to configuration differences between *NIX and Windows machines. I am aware of the differences as well. However, the issue was with documented steps of building Custom Visualizations using Custom Visualization API in Splunk documentation: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomVizTutorial"&gt;http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/CustomVizTutorial&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;As I have mentioned in my answer below, &lt;CODE&gt;package.json&lt;/CODE&gt; needs to be changed for Windows machine as per Environment Variable naming convention. If this can be tested by Splunk Development Team and can be documented on Splunk Docs it would be great.&lt;/P&gt;

&lt;P&gt;Further, as you have suggested the reference to &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/DifferencesbetweenunixandwindowsinSplunkoperations"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/DifferencesbetweenunixandwindowsinSplunkoperations&lt;/A&gt; should also be available in Build Custom Visualization documentation (at least as related pages) so that developers coming from separate backgrounds can refer the same as per their build machine/environment.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 09:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351690#M64508</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-01T09:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351691#M64509</link>
      <description>&lt;P&gt;I got it working by reinstalling Splunk into a path without spaces. Then doing the above.&lt;/P&gt;

&lt;P&gt;The default Windows (C:\Program Files\Splunk) kept throwing errors.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Aug 2018 08:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351691#M64509</guid>
      <dc:creator>jihape</dc:creator>
      <dc:date>2018-08-26T08:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Splunk Custom Visualization API result in a build error on a Windows Machine?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351692#M64510</link>
      <description>&lt;P&gt;That is the first step (thanks for documenting as I had missed it)...however even after that above steps will be required.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Aug 2018 16:54:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351692#M64510</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-26T16:54:28Z</dc:date>
    </item>
  </channel>
</rss>

