FredKSchott / create-snowpack-app

The all-in-one app template for Snowpack. [moved]

Home Page:https://www.snowpack.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[@snowpack/app-template-react-typescript] got error about top-level import

johnsmithsren opened this issue · comments

commented

sorry to bother. but l cant solve this problem by documentatin or by google.

  {
  "include": ["src", "types"],
  "extends": "@snowpack/app-scripts-react/tsconfig.base.json",
  "compilerOptions": {
    // You can't currently define paths in your 'extends' config,
    // so we have to set 'baseUrl' & 'paths' here.
    // Don't change these unless you know what you're doing.
    // See: https://github.com/microsoft/TypeScript/issues/25430
    "baseUrl": "./",
    "paths": {
      "page/*": ["src/page/*"],
    }
  }
}

l use the this templete : app-template-react-typescript
then l run yarn start

got this

✖ Package "page/Account" not found. Have you installed it?

looks like something wrong with the tsconfig , but how to fix it ,what is the corret tsconfig

We don't currently support TSConfig paths, but we have a PR out to add: FredKSchott/snowpack#432

Until then, you'd need to import by "src/page/Account" for Snowpack to properly recognize it