CommonJS 'index' doesn't appear to be getting published #1

Closed
opened 2024-12-09 17:12:04 +01:00 by tom-youd · 1 comment
tom-youd commented 2024-12-09 17:12:04 +01:00 (Migrated from github.com)

Trying to consume this package as CommonJS via @codemirror/state I am getting this error

Cannot find module '@marijn/find-cluster-break' from 'node_modules/@codemirror/state/dist/index.cjs'

When I look at the dist folder for this package all I see is a types file.
Screenshot 2024-12-09 at 16 10 41

I'm assuming that's because npm publish is falling back to the .gitignore file and removing it
https://github.com/marijnh/find-cluster-break/blob/main/.gitignore#L3

Trying to consume this package as CommonJS via `@codemirror/state` I am getting this error ``` Cannot find module '@marijn/find-cluster-break' from 'node_modules/@codemirror/state/dist/index.cjs' ``` When I look at the `dist` folder for this package all I see is a types file. ![Screenshot 2024-12-09 at 16 10 41](https://github.com/user-attachments/assets/911f5c20-af1b-4f86-9723-0f34f74d8b92) I'm assuming that's because npm publish is falling back to the `.gitignore` file and removing it https://github.com/marijnh/find-cluster-break/blob/main/.gitignore#L3
marijnh commented 2024-12-09 17:16:03 +01:00 (Migrated from github.com)

Oh right, npm defaults to using .gitignore when there's no .npmignore file. I've added such a file to sidestep the issue.

Oh right, npm defaults to using `.gitignore` when there's no `.npmignore` file. I've added such a file to sidestep the issue.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/find-cluster-break#1
No description provided.