Hi,
I’ve been experiencing issues when trying to use the editor-core package in my connect express app.
I get the following error inside the iframe in Jira:
/home/stv/Projects/atlas-sp/node_modules/@atlaskit/smart-card/dist/cjs/client/utils/environments.js:1
ReferenceError: window is not defined
at getBaseUrl (/home/stv/Projects/atlas-sp/node_modules/@atlaskit/smart-card/dist/cjs/client/utils/environments.js:28:3)
at new EditorCardProvider (/home/stv/Projects/atlas-sp/node_modules/@atlaskit/smart-card/dist/cjs/providers/editor/index.js:31:49)
at Object.<anonymous> (/home/stv/Projects/atlas-sp/node_modules/@atlaskit/smart-card/dist/cjs/providers/editor/index.js:263:26)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
I have tried installing my packages with both yarn and npm and I still get the same error.
My node version is 12.19.0
My npm version is 6.14.8
My dependencies are
"@atlaskit/button": "^15.1.0",
"@atlaskit/dynamic-table": "^14.1.4",
"@atlaskit/editor-core": "^134.0.1",
"@atlaskit/icon": "^21.1.4",
"@atlaskit/media-core": "^32.1.2",
"@atlaskit/section-message": "^5.0.7",
"@atlaskit/select": "^13.0.6",
"@atlaskit/smart-card": "^14.6.1",
"@atlaskit/spinner": "^15.0.5",
"@atlaskit/textarea": "^4.0.1",
"@atlaskit/textfield": "^4.0.9",
"atlassian-connect-express": "^6.1.0",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
"cookie-parser": "^1.4.5",
"errorhandler": "^1.5.1",
"esm": "^3.2.25",
"express": "^4.17.1",
"express-hbs": "^2.3.4",
"helmet": "^4.1.1",
"morgan": "^1.10.0",
"nocache": "^2.1.0",
"parcel": "^1.12.4",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-intl": "^5.10.2",
"rxjs-compat": "^6.6.3",
"sequelize": "^6.3.5",
"styled-components": "^5.2.0"
I have tried with @atlaskit/editor-core v125.1.1 as well with no success.
Thanks,
Steven