<?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: need help in adding node.js modules in custom widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/1208642#M78547</link>
    <description>&lt;P&gt;Same problem here. I've tried to load SheetJS, ExcelJS, file-saver.js, and so many others, just for a simple use case of trying to export my excel document to the user.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's ZERO documentation from Dojo on how to utilitize your node modules that you install in your widget (im using js api 3.x)&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2022 13:03:50 GMT</pubDate>
    <dc:creator>diaconori</dc:creator>
    <dc:date>2022-09-01T13:03:50Z</dc:date>
    <item>
      <title>need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682133#M63524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to load node.js module in dojo framework used for building custom widget? Any sample code is greatly appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 22:37:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682133#M63524</guid>
      <dc:creator>sapnas</dc:creator>
      <dc:date>2017-03-13T22:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682134#M63525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you be more specific. Also which version of JS Api are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is about just requiring nodejs module in AMD. you can do it like below.&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// This:&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;require&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"fs"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Would become:&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;require&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"dojo/node!fs"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fs&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// Utilise the "fs" module&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Complete details can be found here&amp;nbsp;&lt;A class="link-titled" href="http://dojotoolkit.org/documentation/tutorials/1.10/node/" title="http://dojotoolkit.org/documentation/tutorials/1.10/node/" rel="nofollow noopener noreferrer" target="_blank"&gt;Dojo and Node.js - Dojo Toolkit Tutorial&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:42:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682134#M63525</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2021-12-12T04:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682135#M63526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;how do you incorporate the logic in widget.js?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define&lt;/P&gt;&lt;P&gt;([&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;'dojo/node!fs'],&lt;/P&gt;&lt;P&gt;function(.....,fs)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;somefunction:function(){&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; fs.readFile(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"MyFile.json"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; (err, data) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; (err) alert(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"error"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand it is a client side script but the apps are stored in server folder once created through webappbuilder. I just need a way to manipulate the apps during runtime. I'm currently using a mixed bag with service to manipulate&amp;nbsp; app on iis while the client apps&amp;nbsp; on nodejs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682135#M63526</guid>
      <dc:creator>sapnas</dc:creator>
      <dc:date>2017-03-14T14:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682136#M63527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sapna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement the same but no luck. Did you find any other way around?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am also trying to store custom widget's run time settings into custom_config.json.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 06:47:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682136#M63527</guid>
      <dc:creator>PrashantKirpan</dc:creator>
      <dc:date>2018-09-26T06:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682137#M63528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The widget cannot load "dojo/node!fs" for me, even if i define('dojo/require'). I'm working in WAB environment. Could you give me a workaround?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 07:16:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682137#M63528</guid>
      <dc:creator>DávidGregor</dc:creator>
      <dc:date>2020-04-27T07:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682138#M63529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up using .net Web api rest services in my web app builder widgets.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 17:09:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/682138#M63529</guid>
      <dc:creator>sapnas</dc:creator>
      <dc:date>2020-04-27T17:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/1099649#M74699</link>
      <description>&lt;P&gt;I have the same problem to load "dojo/node!fs". I got an error message with "cannot find node.js require" . does anyone has a solution to this issue? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Sep 2021 01:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/1099649#M74699</guid>
      <dc:creator>JinGao</dc:creator>
      <dc:date>2021-09-19T01:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: need help in adding node.js modules in custom widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/1208642#M78547</link>
      <description>&lt;P&gt;Same problem here. I've tried to load SheetJS, ExcelJS, file-saver.js, and so many others, just for a simple use case of trying to export my excel document to the user.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's ZERO documentation from Dojo on how to utilitize your node modules that you install in your widget (im using js api 3.x)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 13:03:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/need-help-in-adding-node-js-modules-in-custom/m-p/1208642#M78547</guid>
      <dc:creator>diaconori</dc:creator>
      <dc:date>2022-09-01T13:03:50Z</dc:date>
    </item>
  </channel>
</rss>

