Open selfagency opened 1 year ago
Found this Stackoverflow Error TS2351
import Strapi, { StrapiOptions } from "strapi-sdk-js"
const TheStrapi = Strapi as unknown as typeof Strapi.default
const options: StrapiOptions = {
url: "http://strapi-host/",
}
export const strapi = new TheStrapi(options)
Bug report
Describe the bug
Though I can clearly see the class constructor in both the
mjs
andd.ts
files in thenode_modules
folder, I am unable to initialize the Strapi class due to a 'no construct signatures' error.Steps to reproduce the behavior
See code sample below.
Expected behavior
For the Strapi SDK to initialize.
Screenshots
Code snippets
All of these fail to load and yield the above error or similar.
System
Additional context
tsconfig.json