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

problem with meteor-vite@3 and aldeed:collection2 #285

Open
mattsouth opened this issue Jan 23, 2025 · 0 comments
Open

problem with meteor-vite@3 and aldeed:collection2 #285

mattsouth opened this issue Jan 23, 2025 · 0 comments

Comments

@mattsouth
Copy link

If I try and include aldeed:collection2 in to the vue skeleton (using meteor 3.1.1, jorgenvatle:[email protected], vite6 and [email protected]) and use it to attach a schema to the LinksCollection then I get an error in development that says:

I20250123-10:57:57.649(0)? 
I20250123-10:57:57.649(0)? ______[MeteorPackageError]___________________________________________________________
I20250123-10:57:57.649(0)? ⚡   <aldeed:collection2/dynamic>: 
I20250123-10:57:57.649(0)?  ERROR  Could not locate module for path: /dynamic! (server)
I20250123-10:57:57.650(0)? undefined
I20250123-10:57:57.650(0)? 
I20250123-10:57:57.650(0)? --[Error Stack]----------------------------------------------------------------------
I20250123-10:57:57.650(0)?     at _MeteorPackage.getModule (/home/matt/Software/meteor-vue-3.1.1/node_modules/meteor-vite/src/entry/plugin/meteor/package/components/MeteorPackage.ts:105:19)
I20250123-10:57:57.650(0)?     at stubTemplate (/home/matt/Software/meteor-vue-3.1.1/node_modules/meteor-vite/src/entry/plugin/meteor/package/StubTemplate.ts:24:37)
I20250123-10:57:57.650(0)?     at LoadPluginContext.load (/home/matt/Software/meteor-vue-3.1.1/node_modules/meteor-vite/src/entry/plugin/MeteorStubs.ts:50:30)
I20250123-10:57:57.650(0)?     at EnvironmentPluginContainer.load (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:47372:22)
I20250123-10:57:57.650(0)?     at loadAndTransform (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/chunks/dep-M1IYMR16.js:41132:22)
I20250123-10:57:57.650(0)? 
I20250123-10:57:57.650(0)?  🐛  Report an issue:
I20250123-10:57:57.650(0)?   -  https://github.com/JorgenVatle/meteor-vite/issues
I20250123-10:57:57.650(0)? _____________________________________________________________________________________
I20250123-10:57:57.650(0)?  {
I20250123-10:57:57.650(0)?   meteorPackage: _MeteorPackage {
I20250123-10:57:57.650(0)?     name: 'aldeed:collection2',
I20250123-10:57:57.650(0)?     modules: { 'collection2.js': [Array] },
I20250123-10:57:57.650(0)?     mainModulePath: null,
I20250123-10:57:57.650(0)?     lazyMainModulePath: null,
I20250123-10:57:57.650(0)?     packageScopeExports: [ [PackageExport] ],
I20250123-10:57:57.650(0)?     packageId: 'meteor/aldeed:collection2',
I20250123-10:57:57.650(0)?     parsedPackage: {
I20250123-10:57:57.650(0)?       name: 'aldeed:collection2',
I20250123-10:57:57.650(0)?       modules: [Object],
I20250123-10:57:57.650(0)?       packageScopeExports: [Object],
I20250123-10:57:57.650(0)?       mainModulePath: '',
I20250123-10:57:57.650(0)?       packageId: 'meteor/aldeed:collection2',
I20250123-10:57:57.650(0)?       node_modules: [],
I20250123-10:57:57.650(0)?       type: 'atmosphere',
I20250123-10:57:57.650(0)?       packageJson: undefined
I20250123-10:57:57.650(0)?     },
I20250123-10:57:57.650(0)?     meta: {
I20250123-10:57:57.650(0)?       timeSpent: '1ms',
I20250123-10:57:57.651(0)?       ignoreDuplicateExportsInPackages: undefined,
I20250123-10:57:57.651(0)?       viteEnv: 'server',
I20250123-10:57:57.651(0)?       lazyMainModulePath: undefined
I20250123-10:57:57.651(0)?     }
I20250123-10:57:57.651(0)?   },
I20250123-10:57:57.651(0)?   runnerError: Error: RunnerError
I20250123-10:57:57.651(0)?       at reviveInvokeError (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:541:18)
I20250123-10:57:57.651(0)?       at Object.invoke (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:624:15)
I20250123-10:57:57.651(0)?       at ModuleRunner.getModuleInformation (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1192:73)
I20250123-10:57:57.651(0)?       at request (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1214:88)
I20250123-10:57:57.651(0)?       at eval (/home/matt/Software/meteor-vue-3.1.1/imports/api/links.js:5:31)
I20250123-10:57:57.651(0)?       at ESModulesEvaluator.runInlinedModule (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1049:5)
I20250123-10:57:57.651(0)?       at ModuleRunner.directRequest (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1271:61)
I20250123-10:57:57.651(0)?       at ModuleRunner.cachedRequest (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1167:76)
I20250123-10:57:57.651(0)?       at eval (/home/matt/Software/meteor-vue-3.1.1/server/main.js:4:31)
I20250123-10:57:57.651(0)?       at ESModulesEvaluator.runInlinedModule (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1049:5)
I20250123-10:57:57.651(0)?       at ModuleRunner.directRequest (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1271:61)
I20250123-10:57:57.651(0)?       at ModuleRunner.cachedRequest (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1167:76)
I20250123-10:57:57.651(0)?       at ModuleRunner.import (file:///home/matt/Software/meteor-vue-3.1.1/node_modules/vite/dist/node/module-runner.js:1104:12)
I20250123-10:57:57.651(0)?       at file:///home/matt/Software/meteor-vue-3.1.1/node_modules/meteor-vite/dist/DevelopmentEnvironment-FVQV6C2M.mjs:37:5
I20250123-10:57:57.651(0)?       at /tools/static-assets/server/boot.js:453:5
I20250123-10:57:57.651(0)?       at /tools/static-assets/server/boot.js:504:7
I20250123-10:57:57.651(0)? }
I20250123-10:57:57.651(0)? 
I20250123-10:57:57.651(0)? 
I20250123-10:57:57.651(0)? ______[MeteorPackageError]___________________________

The collection2 module uses an unusual import style which I guess is the problem. I find it fails using both the 'static' and 'dynamic' import styles that it describes.

My POC can be seen at https://gitlab.com/mattsouth/meteor-vue-3.1.1/-/tree/48675a1033aacf3109d569cd0c6582a5698bd61b

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