-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCDS- POC header #4281
GCDS- POC header #4281
Conversation
Won't compile GET /en/sla?_rsc=bcp9r 200 in 1743ms
TypeError: Cannot read properties of undefined (reading 'split')
at Object.read (webpack-internal:///(ssr)/./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js:92:30)
at Object.lookup (webpack-internal:///(ssr)/./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js:109:22) ○ Compiling /api/auth/[...nextauth] ...
⚠ ./node_modules/linkedom/commonjs/canvas.cjs
Module not found: Can't resolve 'canvas' in '/Users/timarney/projects/platform-forms-client/node_modules/linkedom/commonjs'
Import trace for requested module:
./node_modules/linkedom/commonjs/canvas.cjs
./node_modules/linkedom/esm/html/canvas-element.js
./node_modules/linkedom/esm/shared/html-classes.js
./node_modules/linkedom/esm/index.js
./node_modules/@cdssnc/gcds-components-react-ssr/dist/esm/lib/server.js
./app/layout.tsx
GET /api/auth/session 200 in 2707ms
[08:26:06.824] WARN: NextAuth warning - Code: debug-enabled Related to:Server.js
|
Any thoughts on how to get around the I can see the same errors throwing on this example but in this case it does render the header. |
56d912d
to
6a5c6ca
Compare
@timarney You should be able to add this bit to your webpack: (config) => {
// Fixes dependency issues with `canvas` and `perf_hooks` of linkedom
config.resolve.fallback = { canvas: false, perf_hooks: false };
return config;
}, |
Thanks @ethanWallace --- Hitting a further issue ⨯ uncaughtException: TypeError: Cannot read properties of undefined (reading 'split')
at Object.read (webpack-internal:///(ssr)/./node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js:92:30) |
Pushed a commit comment out the lang detect for now. |
🧪 Review environmenthttps://2w7jlrxaqnlhuxnjj3hfflcp5a0ibqwp.lambda-url.ca-central-1.on.aws/ |
b1f8f7f
to
f3a9a17
Compare
7586732
to
7a9552e
Compare
@ethanWallace have you folks looked at nonces yet? |
Having done some initial investigation into feasibility we have 2 initial blockers
|
@timarney We haven't explored how a team could use that nonce helper function yet. |
Closing this PR as it was only for feasibility check per #4273 Thanks for the help @ethanWallace |
@timarney could you send a few info my way around your setup on nonces? We have CSP as well but haven't implemented the nonce method but it's something we can look at. I'd be curious to know the implementation details that you have around it. Update: I created issues on our github repo linking back to this PR. If you have anything to add or share you can add it to those issues as well. Thanks for giving it a shot! |
@daine for the nonce It might be possible if the setNonce function was exposed we might be able to set it as we do have the ability to pass the generated nonce to components i.e. on the Form Ownership we pass the nonce to React Select / Emotion. There's further issues with the nonce on our end but noting that's how we've done it for other libs.
|
Summary | Résumé
POC using GCDS Header
#4273