cjs compatibility
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, typescript
- Domain
- developer-experience
Research direction
Start by inspecting the package.json exports map; the issue identifies the package entry points and the CJS failure as ERR_PACKAGE_PATH_NOT_EXPORTED. Verify the change with the repository's npm test script and confirm that a CommonJS consumer can load the package without that error.
Written by the indexing model from the issue text.
Description
Hi,
Using the library in a CJS module results in ERR_PACKAGE_PATH_NOT_EXPORTED due to the export definitions of the package?, the following diff fixes the issue.
diff --git a/node_modules/@massive.com/client-js/package.json b/node_modules/@massive.com/client-js/package.json
index 10bd9dd..de06876 100644
--- a/node_modules/@massive.com/client-js/package.json
+++ b/node_modules/@massive.com/client-js/package.json
@@ -6,8 +6,11 @@
"types": "dist/main.d.ts",
"type": "module",
"exports": {
- "types": "./dist/main.d.ts",
- "import": "./dist/main.js"
+ ".": {
+ "types": "./dist/main.d.ts",
+ "default": "./dist/main.js",
+ "import": "./dist/main.js"
+ }
},
"scripts": {
"test": "mocha",
- Dominant language
- TypeScript
- Stars
- 273
- Forks
- 74
- Avg merge
- 7h 58m
- Merged PRs (30d)
- 11
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from massive-com/client-js
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
massive-com/client-js#303 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
massive-com/client-js#290 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
massive-com/client-js#265 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
massive-com/client-js#250 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
massive-com/client-js#227 · 2 comments ·
All issues in massive-com/client-js
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·