Have you tried running npm install again from the project/app? I’ll update that message to suggest it, since this already came up before and required doing that.
I think this is a Node/npm ecosystem issue (see #4828), triggered more visibly after upgrading to Rspack 1.6.0 (which adds new native bindings) and Node 22.21.0.
It’s a known npm bug with optionalDependencies where a stale or platform-mismatched package-lock.json can cause npm to skip installing the correct native binding. When that happens, npm looks at the lockfile, decides “no native optional dependency for this platform”, and the install fails, the same error a lot of other projects are seeing if you look into the log message.
I haven’t changed our Dockerfile.
So I believe we already do what you’re asking me to do, see:
FROM zcloudws/meteor-build:3.4-beta.14 as builder
WORKDIR /build/source
USER root
RUN chown zcloud:zcloud -R /build
USER zcloud
COPY --chown=zcloud:zcloud . /build/source
RUN meteor npm i --no-audit && meteor build --directory ../app-build
FROM zcloudws/meteor-node-mongodb-runtime:3.4-beta.14-with-tools
COPY --from=builder /build/app-build/bundle /home/zcloud/app
RUN cd /home/zcloud/app/programs/server && npm i --no-audit
WORKDIR /home/zcloud/app
ENTRYPOINT ["/scripts/startup.sh"]
And again, something definitely changed from .12 to .14. It was working fine and is still working fine with .12.
So great! I bet your build times have also improved.
Ok, the Client bundle shaved off 20%. Anyone noticed a doubling of the server memory?
254MB with 3.3.2 and 515 with 3.4-Beta.14
Yes, the same from 3.3.2 to 3.4-Beta-8.
I’m working on the last reports: legacy build issues and problems updating rspack and @meteorjs/rspack when upgrading from beta versions, since I now have reproductions for these.
Regarding the server RAM doubling issue, I haven’t noticed anything, and it’s true I haven’t really checked it deeply yet. It’s a good reminder to look at those metrics as well. I’ll review RAM usage in some apps migrated to Rspack. Have you seen this effect in simple Meteor apps too? I’ll test those as well, because if it doesn’t happen generally it may be related to specific apps, dependencies, or config that I’d like to understand.
Any extra info or reproductions you have are welcome, so I can focus on all reports and review them straight away.
