<?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 Error when using npm run build for Custom Visualization Tutorial in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Error-when-using-npm-run-build-for-Custom-Visualization-Tutorial/m-p/660944#M111736</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I was going through the Custom Visualization Tutorial here:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.1/AdvancedDev/CustomVizTutorial" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.1.1/AdvancedDev/CustomVizTutorial&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;When I got to the step to build the visualization, I ran into the following error when trying to build using windows using&amp;nbsp;&lt;STRONG&gt;npm run build&lt;/STRONG&gt;&amp;nbsp;which is also described in this forum post by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt;&amp;nbsp;:&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351681" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351681&lt;/A&gt;&lt;/P&gt;&lt;PRE&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;/PRE&gt;&lt;P&gt;The workaround described in the post is to change&amp;nbsp;&lt;SPAN&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SPLUNK_HOME&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Windows Environment variable&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;in the package.json file from the *NIX format (&lt;STRONG&gt;$SPLUNK_HOME)&lt;/STRONG&gt; &amp;nbsp;to&amp;nbsp; the Windows (&lt;STRONG&gt;%SPLUNK_HOME%&lt;/STRONG&gt;) so that the scripts look like below.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&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;/PRE&gt;&lt;P&gt;However, when I attempt to build the visualization after changing the package.json file, I still get the following error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;gt; standin@1.0.0 devbuild&lt;BR /&gt;&amp;gt; %SPLUNK_HOME%/bin/splunk cmd node ./node_modules/webpack/bin/webpack.js --progress&lt;BR /&gt;&lt;BR /&gt;'C:\Program' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;/PRE&gt;&lt;P&gt;I am assuming this is because the file path is "C:\Program Files\Splunk" which contains a space. According to the original forum post, the only way to build the visualization on Windows is to reinstall Splunk in a different file path that does not contain spaces. I was hoping there is a different solution for Windows that does not require the reinstallation of Splunk? Or if there is any other mistake I am making that would cause the build to fail?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 21:36:44 GMT</pubDate>
    <dc:creator>nw</dc:creator>
    <dc:date>2023-10-16T21:36:44Z</dc:date>
    <item>
      <title>Error when using npm run build for Custom Visualization Tutorial</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Error-when-using-npm-run-build-for-Custom-Visualization-Tutorial/m-p/660944#M111736</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I was going through the Custom Visualization Tutorial here:&amp;nbsp;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.1/AdvancedDev/CustomVizTutorial" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.1.1/AdvancedDev/CustomVizTutorial&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;When I got to the step to build the visualization, I ran into the following error when trying to build using windows using&amp;nbsp;&lt;STRONG&gt;npm run build&lt;/STRONG&gt;&amp;nbsp;which is also described in this forum post by &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt;&amp;nbsp;:&lt;BR /&gt;&lt;A href="https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351681" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Getting-Data-In/Why-does-Splunk-Custom-Visualization-API-result-in-a-build-error/m-p/351681&lt;/A&gt;&lt;/P&gt;&lt;PRE&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;/PRE&gt;&lt;P&gt;The workaround described in the post is to change&amp;nbsp;&lt;SPAN&gt;the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SPLUNK_HOME&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;Windows Environment variable&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;in the package.json file from the *NIX format (&lt;STRONG&gt;$SPLUNK_HOME)&lt;/STRONG&gt; &amp;nbsp;to&amp;nbsp; the Windows (&lt;STRONG&gt;%SPLUNK_HOME%&lt;/STRONG&gt;) so that the scripts look like below.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&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;/PRE&gt;&lt;P&gt;However, when I attempt to build the visualization after changing the package.json file, I still get the following error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;gt; standin@1.0.0 devbuild&lt;BR /&gt;&amp;gt; %SPLUNK_HOME%/bin/splunk cmd node ./node_modules/webpack/bin/webpack.js --progress&lt;BR /&gt;&lt;BR /&gt;'C:\Program' is not recognized as an internal or external command,&lt;BR /&gt;operable program or batch file.&lt;/PRE&gt;&lt;P&gt;I am assuming this is because the file path is "C:\Program Files\Splunk" which contains a space. According to the original forum post, the only way to build the visualization on Windows is to reinstall Splunk in a different file path that does not contain spaces. I was hoping there is a different solution for Windows that does not require the reinstallation of Splunk? Or if there is any other mistake I am making that would cause the build to fail?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 21:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Error-when-using-npm-run-build-for-Custom-Visualization-Tutorial/m-p/660944#M111736</guid>
      <dc:creator>nw</dc:creator>
      <dc:date>2023-10-16T21:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error when using npm run build for Custom Visualization Tutorial</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Error-when-using-npm-run-build-for-Custom-Visualization-Tutorial/m-p/666042#M111814</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261543"&gt;@nw&lt;/a&gt;&amp;nbsp;- Yes, I have seen the issue. "Program Files" has space in the path.&amp;nbsp; That's the issue. I would switched to Linux or Mac instead. Somehow Windows doesn't work well with it.&lt;/P&gt;&lt;P&gt;Alternatively for Windows, I could say that you can install Splunk on Windows in any folder, and install it in a folder that doesn't have &lt;STRONG&gt;space&lt;/STRONG&gt; in the &lt;STRONG&gt;path&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 16:53:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Error-when-using-npm-run-build-for-Custom-Visualization-Tutorial/m-p/666042#M111814</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2023-10-24T16:53:12Z</dc:date>
    </item>
  </channel>
</rss>

