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.

Typescript demo - Build not working

See original GitHub issue

In the examples the demo “graphql-apollo-server” can not be builded.

  • pull the demo
  • npm install
  • npx prisma2 dev
  • npm rund build <== return errors:
You should specify a configuration value for outputs in Nexus' makeSchema. Provide one to remove this warning.
src/schema.ts:7:7 - error TS2339: Property 'model' does not exist on type 'ObjectDefinitionBlock<"User">'.

7     t.model.id()
        ~~~~~

src/schema.ts:8:7 - error TS2339: Property 'model' does not exist on type 'ObjectDefinitionBlock<"User">'.

8     t.model.name()
        ~~~~~

src/schema.ts:9:7 - error TS2339: Property 'model' does not exist on type 'ObjectDefinitionBlock<"User">'.

9     t.model.email()
        ~~~~~

src/schema.ts:10:7 - error TS2339: Property 'model' does not exist on type 'ObjectDefinitionBlock<"User">'.

10     t.model.posts({
         ~~~~~

(npm run dev works fine)

Thank You

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
martonlangacommented, Nov 27, 2019

Thanks @nikolasburk, it works now! Specifying outputs in makeSchema & generating did it 🙃

0reactions
nikolasburkcommented, Nov 27, 2019

Hey @dizzyn and @martonlanga, this should be fixed now! Please try again if this was fixed with the latest changes for you as well and feel free to reopen the issue if the errors are still there 🙂 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript Compiling with Visual Studio Code
Step 1: Create a simple TS file · Step 2: Run the TypeScript build · Step 3: Make the TypeScript Build the default...
Read more >
node.js - How to run TypeScript files from command line?
TS Node · First you need to install typescript npm install -g typescript · Create one file helloworld.ts · Open command prompt and...
Read more >
Documentation - TypeScript Tooling in 5 minutes
A tutorial to understand how to create a small website with TypeScript. ... TypeScript is warning that your code will likely not run...
Read more >
Documentation - Integrating with Build Tools - TypeScript
Right-Click -> Manage NuGet Packages · Search for Microsoft.TypeScript.MSBuild · Hit Install · When install is complete, rebuild!
Read more >
How to set up TypeScript
You will need a copy of Node.js as an environment to run the package. Then you use a dependency manager like npm, yarn...
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