-
-
Notifications
You must be signed in to change notification settings - Fork 190
Open
Labels
p2-has-workaround 🍰Bug, but has workaround (priority)Bug, but has workaround (priority)
Description
Describe the bug
(See discussion.)
Short version:
When I try to import { BModalComponent } from 'buefy/types/components' in a vue2 project, vite will fail to run:
vite v2.9.8 dev server running at:
> Local: http://localhost:3000/
> Network: use `--host` to expose
ready in 273ms.
The following dependencies are imported but could not be resolved:
buefy/types/components (imported by [...]/vite-resolve-bug/src/components/HelloWorld.vue?id=0)
Are they installed?
Reproduction
https://github.com/asmaloney/vite-resolve-bug
System Info
System:
OS: macOS Mojave 10.14.6
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 1.71 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 18.0.0 - ~/dev/bin/node
Yarn: 1.22.15 - ~/dev/bin/yarn
npm: 8.9.0 - ~/dev/bin/npm
Browsers:
Brave Browser: 101.1.38.111
npmPackages:
vite: ^2.9.8 => 2.9.8Used Package Manager
npm
Logs
> vite-resolve-bug@0.0.1 dev
> vite --force --debug
vite:config bundled config file loaded in 182.85ms +0ms
vite:config using resolved config: {
vite:config plugins: [
vite:config 'vite:pre-alias',
vite:config 'alias',
vite:config 'vite:modulepreload-polyfill',
vite:config 'vite:resolve',
vite:config 'vite:optimized-deps',
vite:config 'vite:html-inline-proxy',
vite:config 'vite:css',
vite:config 'vite:esbuild',
vite:config 'vite:json',
vite:config 'vite:wasm',
vite:config 'vite:worker',
vite:config 'vite:asset',
vite:config 'vite-plugin-vue2',
vite:config 'vite:define',
vite:config 'vite:css-post',
vite:config 'vite:worker-import-meta-url',
vite:config 'vite:client-inject',
vite:config 'vite:import-analysis'
vite:config ],
vite:config server: {
vite:config preTransformRequests: true,
vite:config force: true,
vite:config fs: { strict: true, allow: [Array], deny: [Array] }
vite:config },
vite:config esbuild: { include: /\.ts$/, exclude: /\.(tsx|jsx)$/ },
vite:config configFile: '[...]/src/vite-resolve-bug/vite.config.ts',
vite:config configFileDependencies: [
vite:config '[...]/src/vite-resolve-bug/vite.config.ts'
vite:config ],
vite:config inlineConfig: {
vite:config root: undefined,
vite:config base: undefined,
vite:config mode: undefined,
vite:config configFile: undefined,
vite:config logLevel: undefined,
vite:config clearScreen: undefined,
vite:config server: { force: true }
vite:config },
vite:config root: '[...]/src/vite-resolve-bug',
vite:config base: '/',
vite:config resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
vite:config publicDir: '[...]/src/vite-resolve-bug/public',
vite:config cacheDir: '[...]/src/vite-resolve-bug/node_modules/.vite',
vite:config command: 'serve',
vite:config mode: 'development',
vite:config isWorker: false,
vite:config isProduction: false,
vite:config build: {
vite:config target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config polyfillModulePreload: true,
vite:config outDir: 'dist',
vite:config assetsDir: 'assets',
vite:config assetsInlineLimit: 4096,
vite:config cssCodeSplit: true,
vite:config cssTarget: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
vite:config sourcemap: false,
vite:config rollupOptions: {},
vite:config minify: 'esbuild',
vite:config terserOptions: {},
vite:config write: true,
vite:config emptyOutDir: null,
vite:config manifest: false,
vite:config lib: false,
vite:config ssr: false,
vite:config ssrManifest: false,
vite:config reportCompressedSize: true,
vite:config chunkSizeWarningLimit: 500,
vite:config watch: null,
vite:config commonjsOptions: { include: [Array], extensions: [Array] },
vite:config dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
vite:config },
vite:config preview: {
vite:config port: undefined,
vite:config strictPort: undefined,
vite:config host: undefined,
vite:config https: undefined,
vite:config open: undefined,
vite:config proxy: undefined,
vite:config cors: undefined,
vite:config headers: undefined
vite:config },
vite:config env: { BASE_URL: '/', MODE: 'development', DEV: true, PROD: false },
vite:config assetsInclude: [Function: assetsInclude],
vite:config logger: {
vite:config hasWarned: false,
vite:config info: [Function: info],
vite:config warn: [Function: warn],
vite:config warnOnce: [Function: warnOnce],
vite:config error: [Function: error],
vite:config clearScreen: [Function: clearScreen],
vite:config hasErrorLogged: [Function: hasErrorLogged]
vite:config },
vite:config packageCache: Map(0) {},
vite:config createResolver: [Function: createResolver],
vite:config optimizeDeps: {
vite:config esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
vite:config },
vite:config worker: {
vite:config format: 'iife',
vite:config plugins: [
vite:config [Object], [Object],
vite:config [Object], [Object],
vite:config [Object], [Object],
vite:config [Object], [Object],
vite:config [Object], [Object],
vite:config [Object], [Object],
vite:config [Object], [Object],
vite:config [Object], [Object],
vite:config [Object]
vite:config ],
vite:config rollupOptions: {}
vite:config }
vite:config } +6ms
Forced re-optimization of dependencies
vite v2.9.8 dev server running at:
> Local: http://localhost:3000/
> Network: use `--host` to expose
ready in 284ms.
vite:deps scanning for dependencies... { timestamp: true } +0ms
vite:deps Crawling dependencies using entries:
vite:deps [...]/src/vite-resolve-bug/index.html +0ms
vite:resolve 0.36ms /src/main.ts -> [...]/src/vite-resolve-bug/src/main.ts +0ms
vite:resolve 2.00ms vue -> [...]/src/vite-resolve-bug/node_modules/vue/dist/vue.runtime.esm.js +4ms
vite:resolve 1.14ms buefy -> [...]/src/vite-resolve-bug/node_modules/buefy/dist/esm/index.js +2ms
vite:resolve 0.17ms ./App.vue -> [...]/src/vite-resolve-bug/src/App.vue +0ms
vite:resolve 0.15ms ./components/HelloWorld.vue -> [...]/src/vite-resolve-bug/src/components/HelloWorld.vue +3ms
vite:resolve 1.99ms buefy/types/components -> null +3ms
vite:deps Scan completed in 34.92ms: {
vue: '[...]/src/vite-resolve-bug/node_modules/vue/dist/vue.runtime.esm.js',
buefy: '[...]/src/vite-resolve-bug/node_modules/buefy/dist/esm/index.js'
} +18ms
The following dependencies are imported but could not be resolved:
buefy/types/components (imported by [...]/src/vite-resolve-bug/src/components/HelloWorld.vue?id=0)
Are they installed?Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p2-has-workaround 🍰Bug, but has workaround (priority)Bug, but has workaround (priority)