HSF / phoenix

"Phoenix", an experiment independent web-based event display for High Energy Physics.
https://hepsoftwarefoundation.org/phoenix/
Apache License 2.0
54 stars 54 forks source link

Release building broken #694

Open EdwardMoyse opened 4 days ago

EdwardMoyse commented 4 days ago

This currently fails with messages like:

phoenix-event-display@3.0.0 prepublishOnly /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display
> yarn build:bundle

Building Angular Packagepm pack: info lifecycle phoenix-event-display@3.0.0~prepublishOnly: phoenix-event-display@3.0.0
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠙ npm pack: info lifecycle phoenix-event-display@3.0.0~prepublishOnly: phoenix-event-display@3.0.0
------------------------------------------------------------------------------
Building entry point 'phoenix-ui-components'
------------------------------------------------------------------------------
⠋ Compiling with Angular sources in Ivy full compilation mode.(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ npm pack: info lifecycle phoenix-event-display@3.0.0~prepub
⠙ Compiling with Angular sources in Ivy full compilation mode.(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠋ npm pack: info lifecycle phoenix-event-display@3.0.0~prepub
⠹ Compiling with Angular sources in Ivy full compilation mode.(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠋ npm pack: info lifecycle phoenix-event-display@3.0.0~prepub
⠸ Compiling with Angular sources in Ivy full compilation mode.(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠙ npm pack: info lifecycle phoenix-event-display@3.0.0~prepub
⠼ Compiling with Angular sources in Ivy full compilation mode.(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠙ npm pack: info lifecycle phoenix-event-display@3.0.0~prepub
⠴ Compiling with Angular sources in Ivy full compilation mode.(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ npm pack: info lifecycle phoenix-event-display@3.0.0~prepub
⠦ Compiling with Angular sources in Ivy full compilation mode.(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠹ npm pack: info lifecycle phoenix-event-display@3.0.0~prepub
✔ Compiling with Angular sources in Ivy full compilation mode.
✔ Generating FESM bundlesm pack: info lifecycle phoenix-event-display@3.0.0~prepublishOnly: phoenix-event-display@3.0.0
✔ Copying assets
⠋ Writing package manifestWARNING: Found a conflicting export condition for "./package.json". The "default" condition would be overridden by ng-packagr. Please unset it.
WARNING: Found a conflicting export condition for ".". The "types" condition would be overridden by ng-packagr. Please unset it.
WARNING: Found a conflicting export condition for ".". The "esm2022" condition would be overridden by ng-packagr. Please unset it.
WARNING: Found a conflicting export condition for ".". The "esm" condition would be overridden by ng-packagr. Please unset it.
WARNING: Found a conflicting export condition for ".". The "default" condition would be overridden by ng-packagr. Please unset it.
ℹ Removing scripts section in package.json as it's considered a potential security vulnerability.
ℹ Removing devDependencies section in package.json.
✔ Writing package manifest
✔ Built phoenix-ui-components

------------------------------------------------------------------------------
Built Angular Package
 - from: /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-ng/projects/phoenix-ui-components
 - to:   /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-ng/projects/phoenix-ui-components/dist
------------------------------------------------------------------------------

Build at: 2024-11-11T09:48:53.035Z - Time: 3146ms

assets by status 5.57 KiB [cached] 1 asseted packages/phoenix-ng/projects/phoenix-ui-components
orphan modules 42 bytes [orphan] 1 module
./src/browser.ts + 1 modules 1.95 KiB [not cacheable] [built] [code generated]

ERROR in ./src/browser.ts 2:0-50
Module not found: Error: Can't resolve './event-display.js' in '/Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src'

ERROR in ./src/browser.ts 3:0-48
Module not found: Error: Can't resolve './lib/models/cut.model.js' in '/Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src'

ERROR in ./src/browser.ts 4:0-63
Module not found: Error: Can't resolve './lib/models/preset-view.model.js' in '/Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src'

ERROR in ./src/browser.ts 5:0-60
Module not found: Error: Can't resolve './helpers/pretty-symbols.js' in '/Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src'
etc

I believe the ERRORs are related to webpack (not sure about the WARNINGs).

(base) emoyse@MacBookPro phoenix-event-display % yarn webpack -c configs/webpack.conf.js --stats-error-details

Running with --stats-error-details gives more information:

ERROR in ./src/browser.ts 22:0-90
Module not found: Error: Can't resolve './managers/ui-manager/phoenix-menu/phoenix-menu-node.js' in '/Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src'
resolve './managers/ui-manager/phoenix-menu/phoenix-menu-node.js' in '/Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src'
  using description file: /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/package.json (relative path: ./src/managers/ui-manager/phoenix-menu/phoenix-menu-node.js)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src/managers/ui-manager/phoenix-menu/phoenix-menu-node.js doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src/managers/ui-manager/phoenix-menu/phoenix-menu-node.js.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src/managers/ui-manager/phoenix-menu/phoenix-menu-node.js.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src/managers/ui-manager/phoenix-menu/phoenix-menu-node.js.json doesn't exist
      .wasm
        Field 'browser' doesn't contain a valid alias configuration
        /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src/managers/ui-manager/phoenix-menu/phoenix-menu-node.js.wasm doesn't exist
      as directory
        /Users/emoyse/LocalDocuments/phoenix/packages/phoenix-event-display/src/managers/ui-manager/phoenix-menu/phoenix-menu-node.js doesn't exist

So I don't understand Field 'browser' doesn't contain a valid alias configuration but I think the problem is that the path is wrong i.e.

EdwardMoyse commented 4 days ago

Pinging @emiliocortina and @9inpachi, just in case they know what the problem is?

emiliocortina commented 4 days ago

I'll take a look this week (probably the earliest I can do is Friday). I was having some issues with my local setup too so I'll try it all over again

EdwardMoyse commented 4 days ago

Thanks! I'll keep investigating too. Out of interest, what are the problems you're having locally? (In case I've seen the same).

EdwardMoyse commented 3 days ago

In https://github.com/HSF/phoenix/tree/main-new-release-builder I tried running the automated migration

However now yarn release:minor fails with

lerna info lifecycle phoenix-ng@2.17.0~version: phoenix-ng@2.17.0

> phoenix-ng@2.17.0 version /home/emoyse/phoenix/packages/phoenix-ng
> yarn deploy

Application bundle generation failed. [12.798 seconds]

✘ [ERROR] Could not resolve "vm"

    (disabled):../../node_modules/jsroot/node_modules/jsdom/lib/api.js:5:19:
      5 │ const vm = require("vm");