rollup plugin fails on json import

Open Beginner friendly
#2,461 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
rollup, typescript
Domain
build-system

Research direction

Open packages/snaps-utils/src/derivation-paths.ts at line 2 and reproduce the failure with the Rollup build that imports @metamask/slip44/slip44.json. Update the import so the JSON module is accepted, then confirm the reported Rollup error no longer occurs.

Written by the indexing model from the issue text.

Description

https://github.com/MetaMask/snaps/blob/e95e6709cc3e883582e72994288f3c285ee10d7f/packages/snaps-utils/src/derivation-paths.ts#L2

this line need with { type: 'json' } or the rollup plugin fails

[!] TypeError: Module "file:///Users/hd/code/filsnap/node_modules/.pnpm/@metamask+slip44@3.1.0/node_modules/@metamask/slip44/slip44.json" needs an import attribute of type "json"
Dominant language
TypeScript
Stars
853
Forks
662
Avg merge
2d 8h
Merged PRs (30d)
8

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.

More from MetaMask/snaps

All issues in MetaMask/snaps

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.