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.

`prisma2 init` does not find `ts-node` when using starter kit "GraphQL API (+ Auth)"

See original GitHub issue

Using Prisma 2 version: prisma2@2.0.0-preview-9.1, binary version: bbbeff6f84b408e534ebd866bfd378748e6d6611

When running prisma2 init with the GraphQL API (+ Auth)starter kit I came across the following error. I assume that the npm install did not install everything:

...

✔  Downloading the starter kit from GitHub ...

Preparing your starter kit: GraphQL API (+ Auth)

✔  Downloading the starter kit from GitHub ...
✔  Extracting content to prisma2preview91 ...
✔  Installing dependencies with: `npm install` ...
✔  Preparing your database ...
⠼  Seeding your database with: `npm run seed` ...
 ERROR  Error during command execution

sh: ts-node: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! graphql-auth@ seed: `ts-node prisma/seed.ts`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the graphql-auth@ seed script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nickreynke/.npm/_logs/2019-09-02T17_20_11_738Z-debug.log

After running a npm i I could run npm run seed successfully.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
divyenduzcommented, Sep 30, 2019

I can still reproduce this with alpha.216. At least with the create folder feature of init.

prisma2 init <folder>


Note that the workaround of manually running npm install in the project still works.

2reactions
timsuchanekcommented, Sep 24, 2019

Fixed in the latest alpha.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fullstack App With TypeScript, PostgreSQL, Next.js ... - Prisma
Vercel for deployment. What the course will cover. Data modeling using Prisma; Building a GraphQL API layer in a Next.js API ...
Read more >
Fullstack app with TypeScript, Next.js, Prisma & GraphQL
Learn how to build a fullstack app using TypeScript, PostgreSQL, Next.js, GraphQL and ... In this article you are going to create a...
Read more >
Start from scratch with MongoDB (15 min) - Prisma
Learn how to create a new Node.js or TypeScript project from scratch by connecting Prisma ... Access to a MongoDB 4.2+ server with...
Read more >
End-To-End Type-Safety with GraphQL, Prisma & React: API ...
Learn how to build a fully type-safe application with GraphQL, Prisma, and React. This article walks you through setting up a TypeScript ...
Read more >
Prisma | Next-generation ORM for Node.js & TypeScript
Prisma is a next-generation Node.js and TypeScript ORM for PostgreSQL, MySQL, SQL Server, SQLite, MongoDB, and CockroachDB. It provides type-safety, ...
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