You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to use rollup to bundle the dependencies needed for codemirror with this extension, using node_modules/.bin/rollup editor.mjs -f iife -o editor.bundle.js -p @rollup/plugin-node-resolve as suggested here.
When I do so I get this output:
editor.mjs → editor.bundle.js...
(!) "this" has been rewritten to "undefined"
https://rollupjs.org/troubleshooting/#error-this-is-undefined
node_modules/lang-tex/lib/index.js
1: "use strict";
2: var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
^
3: if (k2 === undefined) k2 = k;
4: Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
...and 3 other occurrences
[!] RollupError: "texSyntax" is not exported by "node_modules/lang-tex/lib/index.js", imported by "editor.mjs".
https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
editor.mjs (3:8)
1:
2: import {EditorView, basicSetup} from "codemirror";
3: import {texSyntax} from "lang-tex";
^
4:
5: let editor = new EditorView({
at error (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:349:30)
at Module.error (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:15073:16)
at Module.traceVariable (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:15498:29)
at ModuleScope.findVariable (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:14023:39)
at Identifier.bind (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:9743:40)
at CallExpression.bind (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:7363:23)
at CallExpression.bind (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:11309:15)
at ArrayExpression.bind (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:7359:28)
at Property.bind (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:7363:23)
at ObjectExpression.bind (/home/frabjous/tmp/textest/node_modules/rollup/dist/shared/rollup.js:7359:28)
The expected behavior is that I not get this error, and that I be able to use the extension in a simple codemirror instance.
It's possible I just didn't install things right. Again, newbie.
Versions
codemirror v 6.0.1
lang-tex 0.0.3
@rollup/plugin-node-resolve 15.1.0
rollup 3.26.2
I did get a lot of deprecation warnings about lezer packages when installing lang-tex, which may or may not be relevant.
Note I posted about this in the codemirror discussion forum here but didn't get any replies.
The text was updated successfully, but these errors were encountered:
Overview.
I am getting an error with this package when trying to make use of it in a codemirror project.
I'm a newbie to codemirror, and just a dabbler not a full time programmer so bear with me.
The error for me can be produced as easily as the following:
Steps to reproduce.
Create a new project with
npm init
.Install codemirror and rollup/@rollup-plugin-node-resolve along with this project:
npm install codemirror lang-tex rollup @rollup/plugin-node-resolve
.Create a javascript module that loads the package. I can get the problem with something as simple as this:
node_modules/.bin/rollup editor.mjs -f iife -o editor.bundle.js -p @rollup/plugin-node-resolve
as suggested here.When I do so I get this output:
The expected behavior is that I not get this error, and that I be able to use the extension in a simple codemirror instance.
It's possible I just didn't install things right. Again, newbie.
Versions
I did get a lot of deprecation warnings about lezer packages when installing lang-tex, which may or may not be relevant.
Note I posted about this in the codemirror discussion forum here but didn't get any replies.
The text was updated successfully, but these errors were encountered: