question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Several projects in `./examples` do not run due to missing client

See original GitHub issue

Bug description

The example projects do not run. Wundergraph does not generate all the files it used to, or they have been renamed.

Screen Shot 2022-10-28 at 7 53 52 PM

How to reproduce

  1. Run nvm use --lts and node --version to ensure node 16.x
  2. Clear node cache to rule out any cached strange behavior npm cache clean --force
  3. Download repo git clone https://github.com/wundergraph/wundergraph
  4. Navigate to example cd wundergraph/examples/nextjs-postgres-user-filters (or any example with a seed script)
  5. Run npm install && npm start and wait until console finishes tasks
  6. Open another terminal in the same directory and run npm run check
  7. See errors in the console

Expected behavior

Can the master branch be kept stable so folks can use the examples at any time? If that is the intention, it seems like adding tests that run the CLI and check that the expected files are generated would be a great addition to tests.

WunderGraph information

Same as in this repo. Here are some snippets in question. wundergraph.client is not generated.

error

npm run check

> wundergraph-nextjs-postgres-prisma@0.1.0 check
> tsc --noEmit

seed/seed.ts:1:24 - error TS2307: Cannot find module '../.wundergraph/generated/wundergraph.client' or its corresponding type declarations.

1 import { Client } from '../.wundergraph/generated/wundergraph.client';
                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in seed/seed.ts:1

Here are also errors in React. This error occurs ONLY the first time running npm run start and is not repeated after the client is generated. Edit - this wasn’t reproduced for me after deleting my node_modules, but the error above was repeated.

Environment & setup

  • OS: Mac 12.6 Intel chip
  • Go version:
  • Database: Postgres
  • Node.js version: 16

WunderCtl Version

npx wunderctl version
Version: 0.114.2
Commit: ee87a7d44e3ca7c5cb9c0c54d96aba85b7a1346b
Date: 2022-10-22T23:57:39Z
BuiltBy: ci

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
fiamcommented, Nov 11, 2022

@bmcilw1 Thanks for the heads up! Some of the generated files were renamed but I had them generated with an older version of the SDK, that’s why I couldn’t reproduce initially. We took the chance to go through all the examples and make sure they were up to date.

0reactions
fiamcommented, Nov 11, 2022

Fixed by #321

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to not run an example using roxygen2? - Stack Overflow
I'm writing a geocoding function right now that relies on having a Bing Maps Key. Obviously I'd rather not publish mine, and the...
Read more >
Issues · terraform-docs/terraform-docs - GitHub
Using YAML block multiline string for output.template results in Error: value of '--output-template' is missing end comment bug.
Read more >
RunClient task failed, need help - Minecraft Forge Forums
I tried to test my mod with the RunClient task, but it fails every time. It runs minecraft, but about 1-2 seconds into...
Read more >
Nothing happens when building "blink" sample project in CCS ...
A little update. It does not work if it is a different / mapped network drive. Creating a folder link (mapping folder on...
Read more >
Tips for Application Troubleshooting - Stackify
A web app with a longer loading time may be due to some complex programs running on the client. Consider the complexity level...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found