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
When updating the EditorJs Interface from extensions-sdk v9.22.1 to v9.22.3 an uncodumented change seems to break the extension. The message SyntaxError: Unexpected identifier 'exports' appears in the console.
It seems to occur on {get exports(){return T$1},set exports(e){T$1=e;}}.exports=function(e){...}, however i am not sure what exactly causes it.
This snippet does not appear in the code when compiling with extensions-sdk v9.22.1, instead it is compiled as T$1.exports = function(e) {...}
To Reproduce
Install directus-extension-editorjs-interface, update extensions-sdk in package.json to v9.22.1 and compile. The extension works as epected.
Change version to v9.22.3, compile again, and the extension will not load, showing the error messages below. Worryingly, this also causes the other installed interface extensions to not work.
Errors Shown
Error 1 (in browser console): Couldn't load extensions
Error 2 (in browser console): SyntaxError: Unexpected identifier 'exports' (at index.js:...)
What version of Directus are you using?
9.22.4
What version of Node.js are you using?
18, from official directus docker container
What database are you using?
MySQL
What browser are you using?
Chrome
How are you deploying Directus?
Docker
The text was updated successfully, but these errors were encountered:
@freekrai and I ran into the same problem today. We've identified it to be caused by an update in @rollup/plugin-terser (from 0.2.x to 0.4.x). Currently investigating what changes in there are affecting us 🙂
Thanks, that indeed seems to be the case. As a temporary fix i have found that you can run the build with the --no-minify option, to prevent terser from being run.
I also found that using the --sourcemap option, a warning is generated that 'terser transformed the files, but did not generate a sourcemap', which is counterintuitive since generating sourcemap seems to have been the whole point of the terser plugin v0.3.0 release.
@eifachnurtobi Turns out the issue is related to newer versions of @rollup/plugin-commonjs where the terser must have some issues to minify the code correctly. See also #17539.
Would you be able to confirm this by overriding the version in your package.json file? Thanks!
Describe the Bug
When updating the EditorJs Interface from extensions-sdk v9.22.1 to v9.22.3 an uncodumented change seems to break the extension. The message
SyntaxError: Unexpected identifier 'exports'
appears in the console.It seems to occur on
{get exports(){return T$1},set exports(e){T$1=e;}}.exports=function(e){...}
, however i am not sure what exactly causes it.This snippet does not appear in the code when compiling with extensions-sdk v9.22.1, instead it is compiled as
T$1.exports = function(e) {...}
To Reproduce
Install directus-extension-editorjs-interface, update extensions-sdk in
package.json
to v9.22.1 and compile. The extension works as epected.Change version to v9.22.3, compile again, and the extension will not load, showing the error messages below. Worryingly, this also causes the other installed interface extensions to not work.
Errors Shown
Error 1 (in browser console):
Couldn't load extensions
Error 2 (in browser console):
SyntaxError: Unexpected identifier 'exports' (at index.js:...)
What version of Directus are you using?
9.22.4
What version of Node.js are you using?
18, from official directus docker container
What database are you using?
MySQL
What browser are you using?
Chrome
How are you deploying Directus?
Docker
The text was updated successfully, but these errors were encountered: