lab-cosmo / chemiscope

An interactive structure/property explorer for materials and molecules
http://chemiscope.org
BSD 3-Clause "New" or "Revised" License
121 stars 29 forks source link

Update to 3Dmol 2.0, now directly compatible with TypeScript #283

Closed Luthaf closed 1 year ago

ceriottm commented 1 year ago

You have asked to break this, and your wish has been granted. When I try to load the azaphenacene example, the npm server crashes and gives the error

<e> [webpack-dev-middleware] ModuleNotFoundError: Module not found: Error: Can't resolve '/home/michele/lavoro/code/chemiscope/node_modules/ts-loader/dist/stringify-loader.js' in '/home/michele/lavoro/code/chemiscope/src/structure'
<e>     at /home/michele/lavoro/code/chemiscope/node_modules/webpack/lib/Compilation.js:2017:28
<e>     at /home/michele/lavoro/code/chemiscope/node_modules/webpack/lib/NormalModuleFactory.js:817:13
<e>     at eval (eval at create (/home/michele/lavoro/code/chemiscope/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
<e>     at /home/michele/lavoro/code/chemiscope/node_modules/webpack/lib/NormalModuleFactory.js:275:22
<e>     at eval (eval at create (/home/michele/lavoro/code/chemiscope/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
<e>     at /home/michele/lavoro/code/chemiscope/node_modules/webpack/lib/NormalModuleFactory.js:448:22
<e>     at /home/michele/lavoro/code/chemiscope/node_modules/webpack/lib/NormalModuleFactory.js:122:11
<e>     at /home/michele/lavoro/code/chemiscope/node_modules/webpack/lib/NormalModuleFactory.js:654:23
<e>     at /home/michele/lavoro/code/chemiscope/node_modules/neo-async/async.js:2830:7
<e>     at done (/home/michele/lavoro/code/chemiscope/node_modules/neo-async/async.js:2925:13)
<e> resolve '/home/michele/lavoro/code/chemiscope/node_modules/ts-loader/dist/stringify-loader.js' in '/home/michele/lavoro/code/chemiscope/src/structure'
<e>   using description file: /home/michele/lavoro/code/chemiscope/package.json (relative path: ./src/structure)
<e>     using description file: /home/michele/lavoro/code/chemiscope/package.json (relative path: ./node_modules/ts-loader/dist/stringify-loader.js)
<e>       no extension
<e>         /home/michele/lavoro/code/chemiscope/node_modules/ts-loader/dist/stringify-loader.js doesn't exist
<e>       .js
<e>         /home/michele/lavoro/code/chemiscope/node_modules/ts-loader/dist/stringify-loader.js.js doesn't exist
<e>       as directory
<e>         /home/michele/lavoro/code/chemiscope/node_modules/ts-loader/dist/stringify-loader.js doesn't exist
Luthaf commented 1 year ago

I'm seeing a lot of changes that I can't quite follow -- can you give some insight into the API changes that necessitated these code changes?

The API changes are minimal, mainly different types declaration and index now being an actual field for AtomSpec.

I also took the opportunuity to cleanup some of the code surrounding the grid and viewer classes.

ceriottm commented 1 year ago

Played a bit more with it, also on the jupyter side, and all seems in good order.