-
Notifications
You must be signed in to change notification settings - Fork 654
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 while using "npm:@planetscale/database" with fresh #789
Comments
Update: It works when directly starting
What is different when running the fresh project through the dev() server? |
I'm also seeing a similar issue but with mongodb driver. When using the mongodb driver in dev mode, I got the following error:
|
@steverandy Maybe your problem is a little different to mine. Deno currently does not import peer dependencies for npm packages automatically, so you have to add an empty 'import {} from "npm:your-missing-packet@version"' to somewhere in your runtime. You can look my other issue here for details: My problem is that I get this error about a missing global which is cryptic to me bc. I don't know which rubbing file is causing it. I suspect, it's the fresh dev mode somehow, by maybe isolating my main Programm more. But! maybe I'm wrong here that your problem is different to mine. Does your code work when running main.ts directly, like with my code? |
Yes. It works when I run main.ts directly. No errors. I also tried adding |
@steverandy The reason seems to be that deno doesn't load peer dependencies yet, |
Closing as duplicate of #978 |
Hello there,
What do I want to do
I tried to run the following in the default index.tsx page:
Unfortunately, this fails with:
The Error Message
Further Information
This error appears to come from the package
@planetscale/database
which is setup in@src/db/index.ts
However, it actually does arise first when adding the query:
More Analysis
I can run the following sucessfully:
Command:
File Content of
./scripts/db/list-pets.ts
:Last Question
Where is the difference from running this code in standalone deno
or running this query inside the index.tsx with the fresh Framework?
The text was updated successfully, but these errors were encountered: