notebookjs icon indicating copy to clipboard operation
notebookjs copied to clipboard

Since 21-Jul-2021 your package does not work in Chrome

Open damilaufer opened this issue 4 years ago • 6 comments

Since version 92 of Chrome, SharedArraybuffer needs a special cross-origin setting. Without it, you get the error below. Maybe you can drop the usage of webidl-conversions. They say you should not use it, even in THEIR readme.md

bundle.js:10825 Uncaught ReferenceError: SharedArrayBuffer is not defined at Object.../node_modules/notebookjs/node_modules/webidl-conversions/lib/index.js (bundle.js:10825) at i (bundle.js:1) at Object.../node_modules/notebookjs/node_modules/whatwg-url/dist/URL.js (bundle.js:10843) at i (bundle.js:1) at Object.../node_modules/notebookjs/node_modules/whatwg-url/webidl2js-wrapper.js (bundle.js:10903) at i (bundle.js:1) at Object.../node_modules/notebookjs/node_modules/whatwg-url/index.js (bundle.js:10897) at i (bundle.js:1) at Object. (bundle.js:7663) at Object.../node_modules/notebookjs/node_modules/jsdom/lib/api.js (bundle.js:7663)

damilaufer avatar Jul 26 '21 12:07 damilaufer

I am also facing the same issue. @damilaufer any update or found way? Please post here!

manjunathangv avatar Jul 27 '21 11:07 manjunathangv

I also facing the same issue in Chrome 92.

victorzxj avatar Aug 09 '21 05:08 victorzxj

Hmmmm, the error seems to be stemming fromwebidl-conversions, which is imported by jsdom — but jsdom isn't needed for notebookjs's browser-based rendering (only Node/CLI-based rendering). And https://jsvine.github.io/nbpreview/, which uses notebookjs without importing jsdom, seems to be working fine in Chrome 92. What is your specific setup?

jsvine avatar Aug 11 '21 13:08 jsvine

Nothing special. React in browser, with: "notebookjs": "^0.6.4",

On Wed, 11 Aug 2021 at 16:43, Jeremy Singer-Vine @.***> wrote:

Hmmmm, the error seems to be stemming fromwebidl-conversions, which is imported by jsdom — but jsdom isn't needed for notebookjs's browser-based rendering (only Node/CLI-based rendering). And https://jsvine.github.io/nbpreview/, which uses notebookjs without importing jsdom, seems to be working fine in Chrome 92. What is your specific setup?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jsvine/notebookjs/issues/36#issuecomment-896838752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4CUZYTR223D3NC67XD2JLT4J465ANCNFSM5BAA6KOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

damilaufer avatar Aug 11 '21 13:08 damilaufer

@damilaufer Thanks. I don't use React, so I'm not familiar with how it handles dependencies. Perhaps someone more familiar with React can help debug and suggest changes that would resolve this use-case?

jsvine avatar Aug 11 '21 13:08 jsvine

@damilaufer Thanks. I don't use React, so I'm not familiar with how it handles dependencies. Perhaps someone more familiar with React can help debug and suggest changes that would resolve this use-case?

yeah~ I try to remove the jsdom dependence In my React project, and it works. Then i push the new npm package to private npm library for team use.thanks for your suggestion.

victorzxj avatar Aug 12 '21 07:08 victorzxj