Prisma-client-js: "An accessor cannot be declared in an ambient context" when compiling Typescript

Created on 1 Dec 2019  路  2Comments  路  Source: prisma/prisma-client-js

Since upgrading to version 17 (2.0.0-preview017.2 specifically) from 16, I've started getting a ton of these Typescript compilation errors when compiling my project:

projects/foo/src/generated/index.d.ts:16240:17 - error TS1086: An accessor cannot be declared in an ambient context.

16240     private get _document();

I'm able to "resolve" the issue by turning on the skipLibCheck flag when compiling, but this feels hacky and wasn't necessary before.

(Just to clarify, my photon client is generated into a specific directory as specified in my prisma file, not node_modules)

bu0-needs-info kinbug

Most helpful comment

Nevermind, I investigated the actual error it was throwing, and it appears to be related to some recent updates to Typescript itself - I updated my project's Typescript version to 3.7.0 based on some recommendations, and that fixed the issue.

All 2 comments

Can you provide a minimal reproduction for this, I am unable to reproduce this from the starters.

Nevermind, I investigated the actual error it was throwing, and it appears to be related to some recent updates to Typescript itself - I updated my project's Typescript version to 3.7.0 based on some recommendations, and that fixed the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

julien1619 picture julien1619  路  3Comments

williamluke4 picture williamluke4  路  3Comments

timsuchanek picture timsuchanek  路  4Comments

divyenduz picture divyenduz  路  3Comments

Errorname picture Errorname  路  3Comments