Select to view content in your preferred language

Custom widgets cause download (as part of deployment) to fail

1396
1
Jump to solution
11-25-2021 11:43 AM
john_cartwright_noaa
Regular Contributor

Hello,

I'm unable to download application as part of publishing process (apparently) due to a webpack error.  I'm using ArcGIS Experience Builder Developer Edition 1.6 and tried both with and without Patch1 applied.  I tried using a clean install of v1.6 and with both node v14 and v16.  Application does contain custom widgets but runs fine when using "View published item" from Builder menu.  It appears from trial and error that any custom widget, even one straight from the arcgis-experience-builder-sdk-resources widget samples causes the problem.  I've included the errors which appear in the server's terminal below and the npm log didn't seem to add any information.  Can anyone offer a suggestion?

Thanks!

--john

 

 

 

clean-webpack-plugin: pausing due to webpack errors
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! exb-client@1.6.0 build:prod: `cross-env NODE_ENV=production OUTPUT_FOLDER=./dist-prod webpack --mode production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the exb-client@1.6.0 build:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jcc/.npm/_logs/2021-11-25T19_34_40_174Z-debug.log
Error: Command failed: npm run build:prod
clean-webpack-plugin: pausing due to webpack errors
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! exb-client@1.6.0 build:prod: `cross-env NODE_ENV=production OUTPUT_FOLDER=./dist-prod webpack --mode production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the exb-client@1.6.0 build:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/jcc/.npm/_logs/2021-11-25T19_34_40_174Z-debug.log

    at checkExecSyncError (child_process.js:790:11)
    at Object.execSync (child_process.js:863:15)
    at /Users/jcc/ArcGISExperienceBuilder/server/src/middlewares/dev/apps/app-download.js:1:7785
    at /Users/jcc/ArcGISExperienceBuilder/server/src/middlewares/dev/apps/app-download.js:1:1312
    at Object.next (/Users/jcc/ArcGISExperienceBuilder/server/src/middlewares/dev/apps/app-download.js:1:1417)
    at /Users/jcc/ArcGISExperienceBuilder/server/src/middlewares/dev/apps/app-download.js:1:324
    at new Promise (<anonymous>)
    at __awaiter (/Users/jcc/ArcGISExperienceBuilder/server/src/middlewares/dev/apps/app-download.js:1:75)
    at compileWidgets (/Users/jcc/ArcGISExperienceBuilder/server/src/middlewares/dev/apps/app-download.js:1:7550)
    at /Users/jcc/ArcGISExperienceBuilder/server/src/middlewares/dev/apps/app-download.js:1:4259 {
  status: 1,
  signal: null,
  output: [
    null,
    <Buffer 0a 3e 20 65 78 62 2d 63 6c 69 65 6e 74 40 31 2e 36 2e 30 20 62 75 69 6c 64 3a 70 72 6f 64 20 2f 55 73 65 72 73 2f 6a 63 63 2f 41 72 63 47 49 53 45 78 ... 20512 more bytes>,
    <Buffer 63 6c 65 61 6e 2d 77 65 62 70 61 63 6b 2d 70 6c 75 67 69 6e 3a 20 70 61 75 73 69 6e 67 20 64 75 65 20 74 6f 20 77 65 62 70 61 63 6b 20 65 72 72 6f 72 ... 481 more bytes>
  ],
  pid: 11338,
  stdout: <Buffer 0a 3e 20 65 78 62 2d 63 6c 69 65 6e 74 40 31 2e 36 2e 30 20 62 75 69 6c 64 3a 70 72 6f 64 20 2f 55 73 65 72 73 2f 6a 63 63 2f 41 72 63 47 49 53 45 78 ... 20512 more bytes>,
  stderr: <Buffer 63 6c 65 61 6e 2d 77 65 62 70 61 63 6b 2d 70 6c 75 67 69 6e 3a 20 70 61 75 73 69 6e 67 20 64 75 65 20 74 6f 20 77 65 62 70 61 63 6b 20 65 72 72 6f 72 ... 481 more bytes>
}

 

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
john_cartwright_noaa
Regular Contributor

It appears that the problem is that if any widget in client/your-extenstions/widgets contains an empty "tests" directory, all Experiences will fail to download (i.e. the production webpack build will fail).  Note that the problem widget does not have to be included in the specific Experience for it to fail.  Also, this behavior only applies to the production build - "preview" and "view published item" both work fine.

View solution in original post

1 Reply
john_cartwright_noaa
Regular Contributor

It appears that the problem is that if any widget in client/your-extenstions/widgets contains an empty "tests" directory, all Experiences will fail to download (i.e. the production webpack build will fail).  Note that the problem widget does not have to be included in the specific Experience for it to fail.  Also, this behavior only applies to the production build - "preview" and "view published item" both work fine.