notebookjs icon indicating copy to clipboard operation
notebookjs copied to clipboard

Trying to use notebookjs with Angular 10, and nodejs v18.0.0.

Open ksareenAfyaMD opened this issue 2 years ago • 1 comments

I tried to add notebooks to my angular project.

          import nb from 'notebookjs';
          var parsed = JSON.parse(resultFile);
          var notebook = nb.parse(parsed);
          console.log(notebook);
          console.log(parsed);

I am getting these errors. There are module not found errors.

 Microsoft.AspNetCore.SpaServices[0]
      ./node_modules/http-proxy-agent/dist/agent.js:45:30-44 - Error: Module not found: Error: Can't resolve 'net' in '...'

fail: Microsoft.AspNetCore.SpaServices[0]
      ./node_modules/http-proxy-agent/dist/agent.js:47:30-44 - Error: Module not found: Error: Can't resolve 'tls' in '...'

fail: Microsoft.AspNetCore.SpaServices[0]
      ./node_modules/http-proxy-agent/dist/agent.js:49:30-44 - Error: Module not found: Error: Can't resolve 'url' in '...'

fail: Microsoft.AspNetCore.SpaServices[0]
      BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.

Could you let us know how to use notebookjs with Angular?

Thank you.

ksareenAfyaMD avatar Jul 16 '23 08:07 ksareenAfyaMD

Hi @ksareenAfyaMD, I'm the maintainer of this library, but unfortunately am not familiar with Angular. If anyone else in the community has suggestions, feel free to share them here.

jsvine avatar Jul 17 '23 13:07 jsvine