Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to import @joplin/turndown into my esm project #10640

Open
vassudanagunta opened this issue Jun 20, 2024 · 8 comments
Open

unable to import @joplin/turndown into my esm project #10640

vassudanagunta opened this issue Jun 20, 2024 · 8 comments
Labels
bug It's a bug medium Medium priority issues

Comments

@vassudanagunta
Copy link
Contributor

Operating system

macOS

Joplin version

latest

Desktop version info

No response

Current behaviour

import TurndownService from '@joplin/turndown'

results in

error TS7016: Could not find a declaration file for module '@joplin/turndown'. '.../node_modules/@joplin/turndown/lib/turndown.cjs.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/joplin__turndown` if it exists or add a new declaration (.d.ts) file containing `declare module '@joplin/turndown';`

The same thing happens for @joplin/turndown-plugin-gfm.

Expected behaviour

Looking in the node_modules/@joplin/turndown, I only see turndown.cjs.js, not the .es.mjs version that the package.json build script mentions.

I was hoping to use your version of Turndown.js!

Logs

No response

@vassudanagunta vassudanagunta added the bug It's a bug label Jun 20, 2024
@personalizedrefrigerator
Copy link
Collaborator

Based on packages/turndown/package.json, it seems that only the CJS version of the library is built in CI:

"build": "rollup -c config/rollup.config.cjs.mjs",

"prepare": "npm run build"

The prepare step might need to be changed to npm run build-all to support ESM.

Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Jul 21, 2024
@vassudanagunta
Copy link
Contributor Author

This is still a needed fix. I hesitate to take a stab at it as I don't (yet) use Joplin and I not sure I can do the update safely without breaking the primary client (Joplin).

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Jul 22, 2024
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Aug 22, 2024
@vassudanagunta
Copy link
Contributor Author

Yes, this really ought to be fixed. @personalizedrefrigerator seems to know what's what. I was hoping it would happen. I'm not familiar at all with the codebase and build system, otherwise I'd make a PR.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Aug 28, 2024
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Sep 27, 2024
@vassudanagunta
Copy link
Contributor Author

should keep reviving this each month?

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Sep 28, 2024
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Oct 28, 2024
@personalizedrefrigerator personalizedrefrigerator added medium Medium priority issues and removed stale An issue that hasn't been active for a while... labels Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug medium Medium priority issues
Projects
None yet
Development

No branches or pull requests

2 participants