codesandbox / codesandbox/codesandbox-client

Cannot find module 'template-icons'

Open
#5,592 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs More Info
Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

yarn install

npm run start
error
to file, without success.
src/templates/icons.ts(29,8): error TS2307: Cannot find module 'template-icons' or its corresponding type declarations.
src/utils/getTemplateIcon.ts(2,37): error TS2307: Cannot find module 'template-icons' or its corresponding type declarations.

自己的解决方案是手动改成
success:
import { ColorIcons as Icons } from '../../../template-icons/src/index'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run yarn install followed by npm run start and confirm the TS2307 errors in src/templates/icons.ts and src/utils/getTemplateIcon.ts. Read those imports and inspect how template-icons is made available in the repository. Done means the module resolves without the reported errors and the start command succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.