Meteor Demo Deploy Issues

I was trying geoffreybooth/meteor-base for production deployment in app runner. It work great locally in my mac m3 machine. However, there are some issues while deploying in app runner, for reference I have attached the screenshots.

I want to deploy a simple meteor/vue v3.3 application with AWS Apprunner
The Demo Meteor app (no Vue) deploy to Apprunner. OK
The Demo Meteor/Vue app deploy to Apprunner. FAIL
The Demo Meteor/Vue app also works locally in my docker. OK

My docker image script is as below:

`# The tag here should match the Meteor version of your app, per .meteor/release
FROM geoffreybooth/meteor-base:3.3

Copy app package.json and package-lock.json into container
COPY ./app/package*.json $APP_SOURCE_FOLDER/

RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh

Copy app source into container
COPY ./app $APP_SOURCE_FOLDER/

RUN bash $SCRIPTS_FOLDER/build-meteor-bundle.sh

Use the specific version of Node expected by your Meteor release, per https://docs.meteor.com/changelog.html; this is expected for Meteor 3.1.2
Use platform-specific image for AWS App Runner (x86_64)
FROM --platform=linux/amd64 node:22.16.0-alpine

RMS: this line is optional, but it’s a good idea to have it
ENV APP_SOURCE_FOLDER=/opt/src

ENV APP_BUNDLE_FOLDER=/opt/bundle
ENV SCRIPTS_FOLDER=/docker

Runtime dependencies; if your dependencies need compilation (native modules such as bcrypt) or you are using Meteor <1.8.1, use app-with-native-dependencies.dockerfile instead
RUN apk --no-cache add
bash
ca-certificates

Copy in entrypoint
COPY --from=0 $SCRIPTS_FOLDER $SCRIPTS_FOLDER/

RMS: this line is optional, but it’s a good idea to have it
COPY --from=0 $APP_SOURCE_FOLDER $APP_SOURCE_FOLDER/

Copy in app bundle
COPY --from=0 $APP_BUNDLE_FOLDER/bundle $APP_BUNDLE_FOLDER/bundle/

RUN bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh

Start app
ENTRYPOINT [“/docker/entrypoint.sh”]

CMD [“node”, “main.js”]`

Do you have the complete output log from Apprunner?

Appreciate for your quick response. Yes I do have. The following is complete log:

[
  "Connecting to MongoDB...",
  "(node:7) [MONGODB DRIVER] Warning: Warning: no saslprep library specified. Passwords will not be sanitized",
  "(Use `node --trace-warnings ...` to show where the warning was created)",
  "Successfully connected to MongoDB",
  "Starting app...",
  "⚡   Starting Vite server...",
  "packages/core-runtime.js:189",
  "            throw error;",
  "            ^",
  "MeteorViteError: ",
  "⚡  Unable to locate Meteor-Vite workers! Make sure you've installed the 'meteor-vite' npm package.",
  " L Install it by running the following command:",
  " L $  npm i -D meteor-vite",
  "    at createWorkerFork (packages/jorgenvatle:vite-bundler/src/workers.ts:18:15)",
  "    at module.wrapAsync.self (packages/jorgenvatle:vite-bundler/src/vite-server.ts:37:24)",
  "    at Module.wrapAsync (/opt/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:252:8)",
  "    at module (/opt/bundle/bundle/programs/server/packages/jorgenvatle_vite-bundler.js:26:9)",
  "    at fileEvaluate (packages/modules-runtime.js:335:7)",
  "    at Module.require (packages/modules-runtime.js:237:14)",
  "    at Module.mod.require (/opt/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)",
  "    at Object.require (packages/modules-runtime.js:257:21)",
  "    at evaluateNextModule (packages/core-runtime.js:167:26)",
  "    at runEagerModules (packages/core-runtime.js:206:3)",
  "    at processNext (packages/core-runtime.js:128:3)",
  "    at packages/core-runtime.js:138:5",
  "    at runEagerModules (packages/core-runtime.js:144:12)",
  "    at processNext (packages/core-runtime.js:128:3)",
  "    at packages/core-runtime.js:138:5",
  "    at evaluateNextModule (packages/core-runtime.js:163:14)",
  "Node.js v22.16.0",
  "Connecting to MongoDB...",
  "(node:7) [MONGODB DRIVER] Warning: Warning: no saslprep library specified. Passwords will not be sanitized",
  "(Use `node --trace-warnings ...` to show where the warning was created)",
  "Successfully connected to MongoDB",
  "Starting app...",
  "⚡   Starting Vite server...",
  "packages/core-runtime.js:189",
  "            throw error;",
  "            ^",
  "MeteorViteError: ",
  "⚡  Unable to locate Meteor-Vite workers! Make sure you've installed the 'meteor-vite' npm package.",
  " L Install it by running the following command:",
  " L $  npm i -D meteor-vite",
  "    at createWorkerFork (packages/jorgenvatle:vite-bundler/src/workers.ts:18:15)",
  "    at module.wrapAsync.self (packages/jorgenvatle:vite-bundler/src/vite-server.ts:37:24)",
  "    at Module.wrapAsync (/opt/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:252:8)",
  "    at module (/opt/bundle/bundle/programs/server/packages/jorgenvatle_vite-bundler.js:26:9)",
  "    at fileEvaluate (packages/modules-runtime.js:335:7)",
  "    at Module.require (packages/modules-runtime.js:237:14)",
  "    at Module.mod.require (/opt/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)",
  "    at Object.require (packages/modules-runtime.js:257:21)",
  "    at evaluateNextModule (packages/core-runtime.js:167:26)",
  "    at runEagerModules (packages/core-runtime.js:206:3)",
  "    at processNext (packages/core-runtime.js:128:3)",
  "    at packages/core-runtime.js:138:5",
  "    at runEagerModules (packages/core-runtime.js:144:12)",
  "    at processNext (packages/core-runtime.js:128:3)",
  "    at packages/core-runtime.js:138:5",
  "    at evaluateNextModule (packages/core-runtime.js:163:14)",
  "Node.js v22.16.0",
  "Connecting to MongoDB...",
  "(node:7) [MONGODB DRIVER] Warning: Warning: no saslprep library specified. Passwords will not be sanitized",
  "(Use `node --trace-warnings ...` to show where the warning was created)",
  "Successfully connected to MongoDB",
  "Starting app...",
  "⚡   Starting Vite server...",
  "packages/core-runtime.js:189",
  "            throw error;",
  "            ^",
  "MeteorViteError: ",
  "⚡  Unable to locate Meteor-Vite workers! Make sure you've installed the 'meteor-vite' npm package.",
  " L Install it by running the following command:",
  " L $  npm i -D meteor-vite",
  "    at createWorkerFork (packages/jorgenvatle:vite-bundler/src/workers.ts:18:15)",
  "    at module.wrapAsync.self (packages/jorgenvatle:vite-bundler/src/vite-server.ts:37:24)",
  "    at Module.wrapAsync (/opt/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:252:8)",
  "    at module (/opt/bundle/bundle/programs/server/packages/jorgenvatle_vite-bundler.js:26:9)",
  "    at fileEvaluate (packages/modules-runtime.js:335:7)",
  "    at Module.require (packages/modules-runtime.js:237:14)",
  "    at Module.mod.require (/opt/bundle/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)",
  "    at Object.require (packages/modules-runtime.js:257:21)",
  "    at evaluateNextModule (packages/core-runtime.js:167:26)",
  "    at runEagerModules (packages/core-runtime.js:206:3)",
  "    at processNext (packages/core-runtime.js:128:3)",
  "    at packages/core-runtime.js:138:5",
  "    at runEagerModules (packages/core-runtime.js:144:12)",
  "    at processNext (packages/core-runtime.js:128:3)",
  "    at packages/core-runtime.js:138:5",
  "    at evaluateNextModule (packages/core-runtime.js:163:14)",
  "Node.js v22.16.0",
  "Connecting to MongoDB...",
  "(node:7) [MONGODB DRIVER] Warning: Warning: no saslprep library specified. Passwords will not be sanitized",
  "(Use `node --trace-warnings ...` to show where the warning was created)",
  "Successfully connected to MongoDB",
  "Starting app...",
  "⚡   Starting Vite server...",
  "packages/core-runtime.js:189",
  "            throw error;",
  "            ^",
  "MeteorViteError: "
]```

The next steps are included in the error log

Looks like you might have the legacy version of jorgenvatle:vite-bundler installed? Unless you’re working on a Meteor v2 app, you can replace the package with jorgenvatle:vite which is the current modern Vite compiler package for Meteor.

I’ve added a warning message to jorgenvatle:vite-bundler about this to avoid any further confusion down the line.

jorgenvatle:vite-bundler (Meteor v2)
jorgenvatle:vite (Meteor v3)

To upgrade:

meteor remove jorgenvatle:vite-bundler
meteor add jorgenvatle:vite
meteor npm i meteor-vite@latest