Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anybody else? Build Problem - "Cannot find module 'cordova-common/src/util/xml-helpers'" with Meteor 3.0 / Node.js 20 project in cordova beforeCompile hook #282

Open
DanielDornhardt opened this issue Aug 7, 2024 · 0 comments

Comments

@DanielDornhardt
Copy link

Bug Report

Hi! :) We're migrating our Meteor 2 App to Meteor 3.0 right now.

Meteor is a framework built on Node.js which recently had a big rewrite. Before the rewrite it wasn't possible to update past Node version 14.x.

But now with Meteor 3.0, the jump to Node 20 is there. And the same project, which works when run / compiled with node 14, fails when being run with Node 20.

Now we try to get our app to be built on top of the new Meteor 3 / Node 20 branch, but we run into this issue:

The cordova android build fails when the beforeCompile.js hook wants to import from cordova-common:

image

What I think is strange is that the node_modules folder of the cordova build seems to be too empty:

image

... is this where the beforeCompile.js should be able to fetch its packages from?

I'm not 100% sure what is going on here, but if anyone has some additional info I'd be happy.

Additional things we've tried:

  • Importing cordova-common manually in the plugins' package.json 0 file, in dependencies, dev-dependencies, and also in engines/cordovaDependencies, but no dice.

Other, less complex plugins and plugins without this hook seem to work without issues. This is the only plugin where I found this issue.

Expected Behaviour

Cordova will run the beforeCompile.js hook with the package cordova-common (and other packages?) available to be imported.

Actual Behaviour

The build fails.

Reproduce Scenario (including but not limited to)

Sorry, I didn't try to create a reproduction yet.

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

(Android) Device Vendor (e.g. Samsung, HTC, Sony...)

cordova info Printout

I'll do a printout when I have more time to investigate, unfortunately I'm short on time right now and it might take a bit. But if there is no progress made I'll get around to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant