adobe / helix-importer-ui

Apache License 2.0
20 stars 25 forks source link

[Regression]: docx generation fails with error: process is not defined #365

Closed kptdobe closed 3 weeks ago

kptdobe commented 3 weeks ago

Try to import https://www.sling.com/whatson/entertainment/comedy/watch-the-bear-on-fx - you'll get the following Javascript error:

log.js:35 [importer-ui] Error importing http://localhost:3001/whatson/entertainment/comedy/watch-the-bear-on-fx?host=https%3A%2F%2Fwww.sling.com: process is not defined ReferenceError: process is not defined
    at helix-importer.js:2:1352639
    at Xg (helix-importer.js:2:1354964)
    at n.log (helix-importer.js:2:1509009)
    at HM.l.storageHandler.convertToDocx (helix-importer.js:2:1509017)
    at helix-importer.js:2:1515076
    at async EM.asyncForEach (helix-importer.js:2:1501583)
    at async HM.l.storageHandler.import (helix-importer.js:2:1514712)
    at async HM (helix-importer.js:2:1521066)
    at async PollImporter.transform (pollimporter.js:147:21)
    at async HTMLIFrameElement.onLoad (import.ui.js:548:21)

cc @amol-anand

kptdobe commented 3 weeks ago

The error is triggered by line https://github.com/adobe/helix-md2docx/blame/main/src/mdast2docx/mdast-download-images.js#L21: return process.env.HELIX_FETCH_FORCE_HTTP1... where process is not defined. Probably a change in Webpack because the code has been here for 3 years...

adobe-bot commented 3 weeks ago

:tada: This issue has been resolved in version 1.51.17 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: