JorgenVatle / meteor-vite

⚡ Replace Meteor's bundler with Vite for blazing fast build-times
MIT License
32 stars 10 forks source link

[Blaze] Detected multiple package definitions #145

Open harry-73 opened 8 months ago

harry-73 commented 8 months ago

Hi,

vite-bundler: 2.0.0-beta.12 meteor-vite: 1.10.2 meteor: 3 beta 6

Creating the new issue about multiple package to avoid polluting the other one.

I added useraccounts:core in my project and to try to use https://github.com/meteor-vue/blaze-integration/issues/16 to use blaze template with Vue3.

When I try to use it with:

<template>
  <v-blaze template="atForm" :data="{ state: 'changePwd' }" />
</template>

<script setup>
  import VBlaze from '../../components/Generic/vBlaze.ts';
</script>

<style></style>

I have the following error message:

Server side:

image

Client side:

image

harry-73 commented 8 months ago

When running meteor lint, I have this error also:

⚡  Building packages to make them available to export analyzer...
⚡  Packages built in 2.9[8](https://github.com/...:14:9)min
⚡  Building with Vite...
⚡  You are using an out of date version of `meteor-vite`.
   Please update it: $ meteor npm i meteor-vite@1.8.0
vite v4.5.2 building for production...
transforming...
✓ 688 modules transformed.
✓ built in 1[9](https://github.com/...#step:14:10).39s
[meteor-vite: stubs] Could not load meteor/blaze (imported by imports/ui/components/Generic/vBlaze.ts): The "path" argument must be of type string. Received undefined
Notice: ⚡   Failed to complete build process:

⚡   Failed to complete build process:
 MeteorViteError: ⚡  Vite build failed!
    at prepareViteBundle (packages/vite/plugin/IntermediaryMeteorProject.ts:158:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at build (packages/vite/build.ts:63:35)
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

TypeError [PLUGIN_ERROR]: Could not load meteor/blaze (imported by imports/ui/components/Generic/vBlaze.ts): The "path" argument must be of type string. Received undefined
    at validateString (node:internal/validators:162:[11](https://github.com/harry-73/VueGPX/actions/runs/8344648524/job/22840127937#step:14:12))
    at Object.join (node:path:1175:7)
    at _ViteLoadRequest.loadFileData (file:///home/runner/work/VueGPX/VueGPX/node_modules/meteor-vite/dist/bin/worker.mjs:1611:26)
    at _ViteLoadRequest.prepareContext (file:///home/runner/work/VueGPX/VueGPX/node_modules/meteor-vite/dist/bin/worker.mjs:[15](https://github.com/harry-73/VueGPX/actions/runs/8344648524/job/22840127937#step:14:16)58:23)
    at Object.setupContext (file:///home/runner/work/VueGPX/VueGPX/node_modules/meteor-vite/dist/bin/worker.mjs:[17](https://github.com/harry-73/VueGPX/actions/runs/8344648524/job/22840127937#step:14:18)71:30)
    at Object.load (file:///home/runner/work/VueGPX/VueGPX/node_modules/meteor-vite/dist/bin/worker.mjs:[18](https://github.com/harry-73/VueGPX/actions/runs/8344648524/job/22840127937#step:14:19)45:38)
    at file:///home/runner/work/VueGPX/VueGPX/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:25544:40
    at async PluginDriver.hookFirstAndGetPlugin (file:///home/runner/work/VueGPX/VueGPX/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:25444:28)
    at async file:///home/runner/work/VueGPX/VueGPX/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:[24](https://github.com/harry-73/VueGPX/actions/runs/8344648524/job/22840127937#step:14:25)611:75
    at async Queue.work (file:///home/runner/work/VueGPX/VueGPX/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:[25](https://github.com/harry-73/VueGPX/actions/runs/8344648524/job/22840127937#step:14:26)654:32) {
  code: 'PLUGIN_ERROR',
  pluginCode: 'ERR_INVALID_ARG_TYPE',
  plugin: 'meteor-vite: stubs',
  hook: 'load',
  watchFiles: [...]
JorgenVatle commented 8 months ago

Hey there 👋

I'll try to have a closer look at this in the next couple of days. In the meantime, would you be able to set up a repository reproducing the error there? 🙏

harry-73 commented 8 months ago

Hi,

Yes, i will try to have a repository that reproduce the issue

harry-73 commented 8 months ago

Here the repo:

https://github.com/harry-73/blaze-vue3-meteor

dallman2 commented 8 months ago

I am having this issue in #151

harry-73 commented 7 months ago

Hey there 👋

I'll try to have a closer look at this in the next couple of days. In the meantime, would you be able to set up a repository reproducing the error there? 🙏

Hi,

Did you see something with the repository? Thanks.