Plugin doesn't play nice with Deno
Closed this issue · 1 comments
This is a reference to my issue with this vite template bluwy/create-vite-extra#16.
Since Deno supports using npm packages directly now, there are many packages that look for a package.json, but do not find one. When using this vite solid plugin, there's a line in one of it's dependencies that throws an error when not finding a package.json. You can fix the problem with deno by just creating an empty package.json, but the goal of using Deno is to avoid that.
The problem occurs in the vitefu package. Maybe there's a way to disable the package.json lookup with a flag, or maybe this issue should also be opened in the vitefu package and not this plugin, but I just wanted to bring this up.
Here's the line that breaks:
// /node_modules/.deno/vite-plugin-solid@2.4.0/node_modules/vitefu/src/index.js:17:11
export async function crawlFrameworkPkgs(options) {
const pkgJsonPath = await findClosestPkgJsonPath(options.root)
if (!pkgJsonPath) {
throw new Error(`Cannot find package.json from ${options.root}`)
}
Update: there's already an update and it's just waiting to be merged.