jsvine / notebookjs

Render Jupyter/IPython notebooks on the fly, in the browser. (Or on the command line, if you'd like.)
MIT License
278 stars 47 forks source link

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

Open damilaufer opened 3 years ago

damilaufer commented 3 years ago

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)

manjunathangv commented 3 years ago

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

victorzxj commented 3 years ago

I also facing the same issue in Chrome 92.

jsvine commented 3 years ago

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?

damilaufer commented 3 years ago

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 .

jsvine commented 3 years ago

@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?

victorzxj commented 3 years ago

@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.