preactjs / preset-vite

Preset for using Preact with the vite bundler
https://npm.im/@preact/preset-vite
MIT License
262 stars 26 forks source link

Error when starting dev server #121

Closed atikenny closed 5 months ago

atikenny commented 5 months ago

Description

When using the command vite, I get the following error message:

Error: @preact/preset-vite tried to access @babel/code-frame, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Notes

Seems like there is a dependency on the @babel/code-frame package, but it is not declared in the package.json. The reason that it doesn't cause issues in most cases is because @babel/core depends on this package, but this could lead to breaking in the future if that package decides to drop it as a dependency.

rschristian commented 5 months ago

@babel/core depends on this package, but this could lead to breaking in the future if that package decides to drop it as a dependency.

This is incredibly stable and a non-issue (beyond your package manager, whichever it is, being needlessly strict).

You can submit a PR if you really want though