trying to publish an ipm module to a private ipm registry and having the following error
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>
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
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 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.
@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.
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
- writing custom code to set the path using an
<Invoke>or - using a CPF merge file to configure the web application (https://docs.intersystems.com/iris20252/csp/docbook/DocBook.UI.Page.cls?KEY=RACS_actions)
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
Ok thank you! I was able to reproduce the problem and isolate it to the
Path="{$cspdir}loan/"line in the<WebApplication>inmodule.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 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.