I’m receiving a rather cryptic error when running rollup -c
. If my index.js
file contains this line (from the examples on the website):
import {schema, defaultMarkdownParser, defaultMarkdownSerializer} from "prosemirror-markdown"
…I receive the following error:
./src/index.js → public/ProseMirror.js...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
punycode (imported by node_modules/markdown-it/lib/index.js, commonjs-external-punycode)
[!] Error: Unexpected token (Note that you need rollup-plugin-json to import JSON files)
node_modules/entities/lib/maps/entities.json (1:10)
1: { "Aacute": "\u00C1", "aacute": "\u00E1", "Abreve": "\u0102", "abreve": "\u010...
^
Error: Unexpected token (Note that you need rollup-plugin-json to import JSON files)
at error (/opt/node_modules_global/lib/node_modules/rollup/dist/rollup.js:5351:30)
at Module.error (/opt/node_modules_global/lib/node_modules/rollup/dist/rollup.js:9643:9)
at tryParse (/opt/node_modules_global/lib/node_modules/rollup/dist/rollup.js:9552:16)
at Module.setSource (/opt/node_modules_global/lib/node_modules/rollup/dist/rollup.js:9868:33)
at Promise.resolve.catch.then.then.then (/opt/node_modules_global/lib/node_modules/rollup/dist/rollup.js:12148:20)
[user@host ~/code/prosetest/prosemirror]$
I have been unable to find explanations of this online. The unexpected token is in an unexpected place in some JSON that I know nothing about. I found nothing useful in the URL shown (https://rollupjs.org…) but have tried installing punycode
and anything else I found mentioned there, with the same results.
Any help with understanding this is deeply appreciated.