Error after reinstalling plugin
KoryIII opened this issue · 3 comments
Hi!
Peertube version is 4.2.2
After uninstall (plugin stopped working) i tried to install it again and got an error -
error[18.10.2022, 10:22:41] Cannot install plugin peertube-plugin-chapters, removing it…
{
« err »: {
« stack »: « /var/www/peertube/storage/plugins/node_modules/marked/src/marked.js:1\n(function (exports, require, module, __filename, __dirname) { import { Lexer } from ‹ ./Lexer.js ›;\n ^^^^^^\n\nSyntaxError: Cannot use import statement outside a module\n at new Script (vm.js:102:7)\n at createScript (vm.js:262:10)\n at Object.runInThisContext (vm.js:310:10)\n at wrapSafe (internal/modules/cjs/loader.js:989:15)\n at Module._compile (internal/modules/cjs/loader.js:1049:27)\n at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10)\n at Module.load (internal/modules/cjs/loader.js:950:32)\n at Function.Module._load (internal/modules/cjs/loader.js:790:12)\n at Module.require (internal/modules/cjs/loader.js:974:19)\n at require (internal/modules/cjs/helpers.js:101:18)\n at Object. (/var/www/peertube/storage/plugins/node_modules/peertube-plugin-chapters/dist/shared/common.js:13:18)\n at Module._compile (internal/modules/cjs/loader.js:1085:14)\n at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10)\n at Module.load (internal/modules/cjs/loader.js:950:32)\n at Function.Module._load (internal/modules/cjs/loader.js:790:12)\n at Module.require (internal/modules/cjs/loader.js:974:19)\n at require (internal/modules/cjs/helpers.js:101:18)\n at Object. (/var/www/peertube/storage/plugins/node_modules/peertube-plugin-chapters/dist/server/main.js:17:18)\n at Module._compile (internal/modules/cjs/loader.js:1085:14)\n at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10)\n at Module.load (internal/modules/cjs/loader.js:950:32)\n at Function.Module._load (internal/modules/cjs/loader.js:790:12)\n at Module.require (internal/modules/cjs/loader.js:974:19)\n at require (internal/modules/cjs/helpers.js:101:18)\n at PluginManager. (/var/www/peertube/versions/peertube-v4.2.2/dist/server/lib/plugins/plugin-manager.js:319:29)\n at Generator.next ()\n at /var/www/peertube/versions/peertube-v4.2.2/node_modules/tslib/tslib.js:117:75\n at new Promise () »,
« message »: « Cannot use import statement outside a module »
}
}
What can I do?
Thank you!
I encountered this issue too, and tried to fix it, but then it randomly started working. I've added Babel, can you try installing version 1.1.2 and see if that works?
Hi
Sorry, but i update the server, and install plugin on 4.3 - it`s work normal.
Kept this open for myself. New release updates marked
, which I think was the cause of the issue.