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
error with @vueuse/core preset #115
Comments
We temporarily close this due to the lack of enough information. |
Sorry, the reproduction is only const { createUnimport } = require("unimport");
const ctx = createUnimport({
presets: ["@vueuse/core"],
});
console.log(ctx.generateTypeDeclarations()); the expected output is all the vueuse types, but this throw a ErrorTypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined at Object.openSync (node:fs:591:10) at Object.readFileSync (node:fs:467:35) at vueuseCore (/Users/amaurytobias/unimport-iss115/node_modules/.pnpm/unimport@0.6.7/node_modules/unimport/dist/chunks/context.cjs:311:41) at /Users/amaurytobias/unimport-iss115/node_modules/.pnpm/unimport@0.6.7/node_modules/unimport/dist/chunks/context.cjs:547:16 at Array.flatMap () at resolveBuiltinPresets (/Users/amaurytobias/unimport-iss115/node_modules/.pnpm/unimport@0.6.7/node_modules/unimport/dist/chunks/context.cjs:544:18) at createUnimport (/Users/amaurytobias/unimport-iss115/node_modules/.pnpm/unimport@0.6.7/node_modules/unimport/dist/chunks/context.cjs:629:29) at Object. (/Users/amaurytobias/unimport-iss115/index.cjs:3:13) at Module._compile (node:internal/modules/cjs/loader:1112:14) at Module._extensions..js (node:internal/modules/cjs/loader:1166:10) { code: 'ERR_INVALID_ARG_TYPE' } /Users/amaurytobias/unimport-iss115/node_modules/.pnpm/unimport@0.6.7/node_modules/unimport/dist/chunks/context.cjs:318 throw new Error("[auto-import] failed to load @vueuse/core, have you installed it?"); ^Error: [auto-import] failed to load @vueuse/core, have you installed it? I think the Here is the minimal reproduction repository |
I using this lib with Vite as
and this configuration gives me
Error
On unplugin-auto-import the @vueuse/core preset is different on the lines: 14:24
(unimport)[https://github.com/unjs/unimport/blob/main/src/presets/vueuse-core.ts]
unplugin-auto-import
idk if this can resolve the issue.
The text was updated successfully, but these errors were encountered: