You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest built-from-source container fails to start with the following stack trace:
file:///home/node/xen-orchestra/@xen-orchestra/rest-api/dist/vms/vm.controller.mjs:10 xo | import { Example, Get, Path, Query, Request, Response, Route, Security } from 'tsoa'; xo | ^^^^^^^ xo | SyntaxError: Named export 'Example' not found. The requested module 'tsoa' is a CommonJS module, which may not support all module.exports as named exports. xo | CommonJS modules can always be imported via the default export, for example using: xo | xo | import pkg from 'tsoa'; xo | const { Example, Get, Path, Query, Request, Response, Route, Security } = pkg; xo | xo | at ModuleJob._instantiate (node:internal/modules/esm/module_job:146:21) xo | at async ModuleJob.run (node:internal/modules/esm/module_job:229:5) xo | at async ModuleLoader.import (node:internal/modules/esm/loader:473:24) xo | at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)
Seems to be an Upstream issue since building a container image with Commit 5dbb5291262f6e392a96ec7fe85a437b6873e1c9 @ https://github.com/vatesfr/xen-orchestra/commits/master/
Works and everything after seems broken as the commit immediately after introduces the files causing this issue.
I am not really familiar with node build processes so could be just a missing depedency or so.
Ok, did some more digging looks like these steps in the cleanup removes too many of modules and breaks things. Commenting them and the latest version of Xen-Orchestra runs fine.
RUN npm install -g modclean
RUN modclean -r
# remove unused files like docs, empty files... (scrap something like 25Mo)
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
RUN node-prune
The latest built-from-source container fails to start with the following stack trace:
file:///home/node/xen-orchestra/@xen-orchestra/rest-api/dist/vms/vm.controller.mjs:10 xo | import { Example, Get, Path, Query, Request, Response, Route, Security } from 'tsoa'; xo | ^^^^^^^ xo | SyntaxError: Named export 'Example' not found. The requested module 'tsoa' is a CommonJS module, which may not support all module.exports as named exports. xo | CommonJS modules can always be imported via the default export, for example using: xo | xo | import pkg from 'tsoa'; xo | const { Example, Get, Path, Query, Request, Response, Route, Security } = pkg; xo | xo | at ModuleJob._instantiate (node:internal/modules/esm/module_job:146:21) xo | at async ModuleJob.run (node:internal/modules/esm/module_job:229:5) xo | at async ModuleLoader.import (node:internal/modules/esm/loader:473:24) xo | at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)
Container build parameters used:
--pull
--no-cache
The text was updated successfully, but these errors were encountered: