ipm icon indicating copy to clipboard operation
ipm copied to clipboard

trying to publish an ipm module to a private ipm registry and having the following error

Open evshvarov opened this issue 2 months ago • 6 comments

zpm:USER>publish demo-loan-frontend

[USER|demo-loan-frontend] Initialize START [USER|demo-loan-frontend] Initialize SUCCESS [USER|demo-loan-frontend] Reload START (/home/irisowner/dev/) [USER|demo-loan-frontend] Reload SUCCESS [demo-loan-frontend] Module object refreshed. [USER|demo-loan-frontend] Validate START [USER|demo-loan-frontend] Validate SUCCESS [USER|demo-loan-frontend] Compile START [USER|demo-loan-frontend] Compile SUCCESS [USER|demo-loan-frontend] Activate START [USER|demo-loan-frontend] Configure START [USER|demo-loan-frontend] Configure SUCCESS [USER|demo-loan-frontend] Activate SUCCESS [USER|demo-loan-frontend] Publish START [USER|demo-loan-frontend] Package START [demo-loan-frontend] Package FAILURE [demo-loan-frontend] Publish FAILURE ERROR! Can not export '{$CSPDIR}LOAN' type in %RO format for item ''. zpm:USER>

Here is the module.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
  <Document name="demo-loan-frontend.ZPM">
    <Module>
      <Name>demo-loan-frontend</Name>
      <Version>1.0.0</Version>
      <Description>Frontend for Demo-Loan Interoperability case</Description>
      <Keywords>REST,Frontend,React,Lovable</Keywords>
      <Packaging>module</Packaging>
      <FileCopy Name="dist/" Target="{$cspdir}loan/"/>
      <WebApplication 
  Name="/loan"
  NameSpace="{$namespace}"
  Path="{$cspdir}loan"
  Recurse="1"
  ServeFiles="1"
  CookiePath="{$cspdir}loan"
  UseCookies="2"
/>
      <SourcesRoot>src</SourcesRoot>
    </Module>
  </Document>
</Export>

evshvarov avatar Oct 15 '25 14:10 evshvarov

This is the repo to reproduce: https://github.com/evshvarov/credit-app-maker Build and run docker container. and try to publish to any ipm registry

evshvarov avatar Oct 16 '25 05:10 evshvarov

There isn't a dist/ directory in the GitHub repo but it's referenced by the <FileCopy>. What is supposed to be in there?

isc-dchui avatar Oct 16 '25 20:10 isc-dchui

@isc-dchui dist/ is in .gitignore as it contains build data artifacts of 'npm build' command as it is a react frontend app. I can add it if you want so it will be in the repo but it is not recommended by all frontend builders to push it to the repo.

evshvarov avatar Oct 17 '25 04:10 evshvarov

@isc-dchui anyways, made the push of dist/ to the repo. Now can be reproducible just by build docker image and publish to the repo.

evshvarov avatar Oct 17 '25 05:10 evshvarov

Ok thank you! I was able to reproduce the problem and isolate it to the Path="{$cspdir}loan/" line in the <WebApplication> in module.xml.

The workaround is to remove that line for now and either

  1. writing custom code to set the path using an <Invoke> or
  2. using a CPF merge file to configure the web application (https://docs.intersystems.com/iris20252/csp/docbook/DocBook.UI.Page.cls?KEY=RACS_actions)

isc-dchui avatar Oct 17 '25 14:10 isc-dchui

Thank you @isc-dchui ! I used another workaround - used deprecated <CSPApplication> element:

<CSPApplication 
  Url="/loan"
  SourcePath="/dist"
  DeployPath="${cspdir}loan"
  CookiePath="${cspdir}loan"
  Recurse="1"
  ServeFiles="1"
  UseCookies="2"
/>

Which installs /loan Web Application and copies files from /dist to /${cspdir}loan. And publish command works with no errors

evshvarov avatar Oct 17 '25 17:10 evshvarov

Ok thank you! I was able to reproduce the problem and isolate it to the Path="{$cspdir}loan/" line in the <WebApplication> in module.xml.

@isc-dchui I'm curious, what is causing the error message? When can I expect this will be fixed in a new version of the package manager?

tobikrs avatar Nov 18 '25 10:11 tobikrs

@tobikrs Hopefully we'll be able to release IPM 0.10.5 with the fix soon, but in the meantime, you can either use the CSPApplication workaround or try the beta version.

isc-dchui avatar Dec 02 '25 15:12 isc-dchui