Getting errors when importing new CapacitorProject and CapacitorConfig

I am not sure this will give me what I want, but I want to see if CapacitorProject can give me the build numbers for iOS and Android. I can then compare those values to what users are running to see if they are on the latest build. So far I’ve done the following…

npm install @capacitor/project

My project immediately stops building with:

This dependency was not found:

* readline in ./node_modules/prompts/dist/elements/prompt.js, ./node_modules/prompts/lib/elements/prompt.js

So I install it:

npm install --save readline

Then I get:

 WARNING  Compiled with 1 warning                    5:10:37 PM

 warning  in ./node_modules/simple-plist/dist/index.js

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

What am I doing wrong?

And in dev console:

polyfills.js:35 Uncaught TypeError: Cannot read properties of undefined (reading 'match')
    at patch (polyfills.js:35)
    at patch (graceful-fs.js:104)
    at Object.<anonymous> (graceful-fs.js:96)
    at Object../node_modules/graceful-fs/graceful-fs.js (graceful-fs.js:373)
    at __webpack_require__ (bootstrap:853)
    at fn (bootstrap:150)
    at Object../node_modules/fs-extra/lib/fs/index.js (index.js:5)
    at __webpack_require__ (bootstrap:853)
    at fn (bootstrap:150)
    at Object../node_modules/fs-extra/lib/index.js (index.js:5)

@mhartington Can you help with this? We really need to be able to dynamically know what the latest build is for iOS and Android so we can do dynamic feature flags. For example, if we add capacitor/camera in a build and want to make sure someone has that build installed or push notifications or anything like that, we can say "you must download an update of our app from the app store ". Isn’t that what CapacitorProject and CapacitorConfig are all about?

Can you share a sample project?