-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Closed
Labels
package: core@ionic/core package@ionic/core packagetype: buga confirmed bug reporta confirmed bug report
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
Current Behavior
In Ionic 6, IonCol doesn't work in SSR in Blitz JS.
Expected Behavior
To work in SSR
Steps to Reproduce
- Create a Blitz app: https://blitzjs.com/docs/get-started#create-a-new-app
- Add Ionic React 6
- Render a component using IonCol
- You get:
event - compiled successfully
event - build page: /api/rpc/getCurrentUser
wait - compiling...
event - compiled successfully
08:03:01.785 INFO getCurrentUser() Starting with input: null
08:03:01.792 INFO getCurrentUser() Finished: resolver:0ms serializer:2ms total:3ms
08:03:03.113 INFO getCurrentUser() Starting with input: null
08:03:03.119 INFO getCurrentUser() Finished: resolver:0ms serializer:5ms total:5ms
event - build page: /_error
wait - compiling...
event - compiled successfully
ReferenceError: window is not defined
at eval (webpack-internal:///./node_modules/@ionic/core/components/ion-col.js:37:13)
at Object../node_modules/@ionic/core/components/ion-col.js (/home/sofiane/sandbox/.next/server/pages/index.js:660:1)
at __webpack_require__ (/home/sofiane/sandbox/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///./node_modules/@ionic/react/dist/index.js:47:19)
at Object../node_modules/@ionic/react/dist/index.js (/home/sofiane/sandbox/.next/server/pages/index.js:1584:1)
at __webpack_require__ (/home/sofiane/sandbox/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///./app/core/components/GridExample.tsx:7:70)
at Object../app/core/components/GridExample.tsx (/home/sofiane/sandbox/.next/server/pages/index.js:66:1)
at __webpack_require__ (/home/sofiane/sandbox/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///./app/pages/index.tsx:21:90)
Code Reproduction URL
https://github.com/SofianeDjellouli/blitz-ionic6-issue-reproduction
Ionic Info
[WARN] You are not in an Ionic project directory. Project context may be missing.
Ionic:
Ionic CLI : 5.4.16
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v17.1.0
npm : 6.14.15
OS : Linux 4.19
Additional Information
It has nothing to do with it, but I had to use next-transpile-modules
since Ionic 6 is using ES6 modules.
Polarisation
Metadata
Metadata
Assignees
Labels
package: core@ionic/core package@ionic/core packagetype: buga confirmed bug reporta confirmed bug report