Skip to content

Default typescript app doesn't compile #83

@mischief-codes

Description

@mischief-codes

Hello there :)

Description

When I run the default create-landscape-app command with --typescript and without any code changes, I get this compile error (and a few other errors downstream of it).

src/app.tsx:3:59 - error TS7016: Could not find a declaration file for module '@urbit/api'. '/Users/mischief/my-app/ui/node_modules/@urbit/api/dist/cjs/index.cjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/urbit__api` if it exists or add a new declaration (.d.ts) file containing `declare module '@urbit/api';`

3 import { Charges, ChargeUpdateInitial, scryCharges } from '@urbit/api';
                                                            ~~~~~~~~~~~~

Steps to Reproduce

npx @urbit/create-landscape-app --typescript
cd my-app/ui
npm i
npm i typescript
npm run build

Also tried using yarn and got the same thing.

Specifications

  • npm 9.8.1
  • node v18.18.2
  • npx 9.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions