I'm trying to connect my meteor app running on localhost:4000 to the server of another meteor app running on localhost:3000;
reading the docs, I'm trying to do
import { DDP } from 'meteor/ddp-client'
As soon as I add this import, the app starts crashing with this error:
[vite] (client) Pre-transform error: Failed to resolve import "../common/namespace.js" from "meteor/ddp-client". Does the file exist?
my vite.config.js:
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { meteor } from "meteor-vite/plugin";
export default defineConfig({
plugins: [
meteor({
clientEntry: "imports/ui/main.js",
serverEntry: "server/main.js",
enableExperimentalFeatures: true,
stubValidation: {
ignorePackages: ["meteor/mongo"],
},
}),
vue(),
],
optimizeDeps: {
exclude: ["vue-meteor-tracker"],
},
});
my package.json:
...
"dependencies": {
"@babel/runtime": "^7.23.5",
"@tailwindcss/postcss": "^4.1.10",
"@vueuse/core": "^13.5.0",
"bcrypt": "^6.0.0",
"flyonui": "^2.2.0",
"meteor-node-stubs": "^1.2.7",
"notyf": "^3.10.0",
"postcss-load-config": "^6.0.1",
"tailwindcss": "^4.1.10",
"tailwindcss-motion": "^1.1.1",
"vue": "^3.5.17",
"vue-router": "^4.2.5"
},
"meteor": {
"modern": true,
"mainModule": {
"client": "client/entry-meteor.js",
"server": "server/entry-meteor.js"
},
"testModule": "tests/main.js"
},
"devDependencies": {
"@faker-js/faker": "^9.9.0",
"@iconify-json/tabler": "^1.2.19",
"@iconify/tailwind4": "^1.0.6",
"@vitejs/plugin-vue": "^5.2.1",
"autoprefixer": "^10.4.16",
"meteor-vite": "^3.2.1",
"postcss": "^8.5.6",
"prettier": "^3.5.3",
"prettier-plugin-tailwindcss": "^0.6.13",
"vite": "^6.0.11"
}
I'm using jorgenvatle:[email protected]