Export * rmg-auto-complete

Open
#7 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
react, typescript

Research direction

Start by reproducing the import failure and inspect node_modules/@railmapgen/rmg-components/dist/rmg-auto-complete/rmg-auto-complete.js together with node_modules/@choc-ui/chakra-autocomplete/dist/index.js and its package.json. Trace how the ES module and CommonJS exports interact; done means importing rmg-auto-complete no longer raises the reported ReferenceError.

Written by the indexing model from the issue text.

Description

enhancement
Error: ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/home/runner/work/rmp/rmp/node_modules/@railmapgen/rmg-components/node_modules/@choc-ui/chakra-autocomplete/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
 ❯ node_modules/@railmapgen/rmg-components/node_modules/@choc-ui/chakra-autocomplete/dist/index.js:1:36
 ❯ node_modules/@railmapgen/rmg-components/dist/rmg-auto-complete/rmg-auto-complete.js:1:174
Dominant language
TypeScript
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.