Skip to content

Package unavailable at jspm #12

@bjhess

Description

@bjhess

I wanted to share this in case it relates to any real issues with the library. Feel free to close it with "not our problem" though!

I am using Tiptap via Rhino and Rails. Specifically I am loading libraries with Import Maps. I couldn't pin this extension in my usual way:

> bin/importmap pin "@aarkue/tiptap-math-extension"                
Couldn't find any packages in ["@aarkue/tiptap-math-extension"] on jspm

Nor did jsdelivr work

> bin/importmap pin "@aarkue/tiptap-math-extension" --from jsdelivr
Couldn't find any packages in ["@aarkue/tiptap-math-extension"] on jsdelivr

unpkg did work:

> bin/importmap pin "@aarkue/tiptap-math-extension" --from unpkg   
Pinning "@aarkue/tiptap-math-extension" to https://unpkg.com/@aarkue/tiptap-math-extension@1.3.3/dist/index.js

Leading to this in my importmap.rb file:

pin "@aarkue/tiptap-math-extension", to: "https://unpkg.com/@aarkue/tiptap-math-extension@1.3.3/dist/index.js"
pin "evaluatex/dist/evaluatex", to: "https://unpkg.com/evaluatex@2.2.0/dist/evaluatex"
pin "katex", to: "https://unpkg.com/katex@0.16.15/dist/katex.mjs"

I visited https://generator.jspm.io to see if I could cobble together a jspm entry manually. I searched for "@aarkue/tiptap-math-extension" and here's what I saw:
CleanShot 2024-12-10 at 10 19 04@2x

Error: No './dist/evaluatex' exports subpath defined in https://ga.jspm.io/npm:evaluatex@2.2.0/ resolving evaluatex/dist/evaluatex imported from https://ga.jspm.io/npm:@aarkue/tiptap-math-extension@1.3.3/dist/index.js.

In case it's helpful, this seems a bit similar to my challenges importing MathExtension when loading up Rhino/Tiptap. Snippet from my rhino_controller.js file:

import MathExtension from "@aarkue/tiptap-math-extension"
...
rhino.addExtensions([MathExtension])

In the browser:

Failed to register controller: rhino (controllers/rhino_controller) SyntaxError: The requested module 'evaluatex/dist/evaluatex' does not provide an export named 'default'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions