Experience Builder 1.6 - Unable to Download Experience Zipfile with a Custom Widget

3036
7
Jump to solution
10-27-2021 10:56 AM
EsCush
by
New Contributor II

Using developer edition, I tried to upgrade my local experience from Experience builder 1.5 to 1.6 and the 'Download' option on the application throws error 'Not Found'. When I remove my custom widget, it works fine. To rule out my own custom widget, I tried to add the 'Simple' widget provided by ESRI and this also causes it to error out. The server log shows:

npm ERR! Failed at the exb-client@1.6.0 build:prod script.

0 Kudos
1 Solution

Accepted Solutions
EsCush
by
New Contributor II

Dave - thanks.  Knowing that it is supposed to work at all made me look closer at my ExB 1.6 installation.  I had installed all the sample widgets from: https://github.com/esri/arcgis-experience-builder-sdk-resources.  Two of these sample widgets have some errors when starting up the client so I deleted them.  Restarted the client and voila - now the Download zipfile is working.  Here are the 2 sample widgets I deleted for anyone else that runs into this issue:

react-data-grid 

use-calcite-components 

View solution in original post

7 Replies
DaveFullerton
Occasional Contributor III

I created an app in 1.5 that contained only the simple widget and migrated it to 1.6 but was not able to reproduce the issue.  Does it error out when you do that or only when you migrate a specific app with the simple widget in it?

EsCush
by
New Contributor II

Dave - thanks.  Knowing that it is supposed to work at all made me look closer at my ExB 1.6 installation.  I had installed all the sample widgets from: https://github.com/esri/arcgis-experience-builder-sdk-resources.  Two of these sample widgets have some errors when starting up the client so I deleted them.  Restarted the client and voila - now the Download zipfile is working.  Here are the 2 sample widgets I deleted for anyone else that runs into this issue:

react-data-grid 

use-calcite-components 

DaveFullerton
Occasional Contributor III

Glad to have helped.  I would have never guessed that Download zipfile would have been related to problems with custom widgets and running the client.

0 Kudos
Dan_
by
New Contributor II

I ran into the same issue. My Problem was my nodejs setup. EB v1.5 was running perfectly fine with a newer Version of nodejs. With EB v1.6 I got the download error with custom widgets until I had installed a fresh version of nodejs lts

0 Kudos
DaveFullerton
Occasional Contributor III

@Dan_ Could you specify which version of node you were running with which downloading did not work?

0 Kudos
Dan_
by
New Contributor II

Hi @DaveFullerton , sorry for the late reply.

Node 16.13.0 LTS throws an error after publishing and downloading an experience that uses custom widgets. The download won't work and I get "Not Fround" in the web browser.

 

 

[webpack-cli] Failed to load 'C:\...\ExperienceBuilder\1.6\client\webpack.config.js' config
[webpack-cli] Error: ENOENT: no such file or directory, stat 'C:\...\ExperienceBuilder\1.6\client\dist-prod\widgets\my-custom-widget\'
.
.
.
Error: Command failed: npm run build:prod

 

 

After switching to Node 14.18.1 LTS and restarting the server everything works just fine.

0 Kudos
Fedor_Haaker
New Contributor II

Hi @Dan_ , Just ran into the same issue with the same exception in the npm run build:prod for EB v1.6.0 and Node  16.13.0.  I fixed it bij removing the custom widget from the dist\widgets\widgets_info.json. The webpack-extensions.config.js has a function clearCustomWidgets that is called during the build. This function does a compare between de files widgets-info-existed.json en widget-info.json en tries to throw away custom widgets, that ar not in the existing list, from the dist-prod folder.  While the widget is not there the first time you do a build for prod, it throws an error.

Interesting how a downgrade to Node 14.18.1 also was able to fix the problem...

0 Kudos