Skip to content
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

Deno can't bundle tensorflow.js from Skypack #8597

Closed
ryanwhite04 opened this issue Dec 3, 2020 · 1 comment · Fixed by #8901
Closed

Deno can't bundle tensorflow.js from Skypack #8597

ryanwhite04 opened this issue Dec 3, 2020 · 1 comment · Fixed by #8901
Labels
bug Something isn't working correctly cli related to cli/ dir swc related to swc (bundling/transpiling)

Comments

@ryanwhite04
Copy link

  • deno 1.5.4 (bc79d55, release, x86_64-unknown-linux-gnu)
  • v8 8.8.278.2
  • typescript 4.0.5

Using the command:

deno bundle https://cdn.skypack.dev/@tensorflow/tfjs tfjs.js

I get the following error:

Bundle https://cdn.skypack.dev/@tensorflow/tfjs
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/swc_bundler-0.17.1/src/bundler/chunk/merge.rs:128:22
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:483
   1: core::panicking::panic_fmt
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:85
   2: core::panicking::panic
             at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/panicking.rs:50
   3: core::option::Option<T>::unwrap
   4: scoped_tls::ScopedKey<T>::set
   5: core::iter::adapters::map_fold::{{closure}}
   6: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::spec_extend
   7: core::iter::traits::iterator::Iterator::collect
   8: swc_bundler::bundler::chunk::merge::<impl swc_bundler::bundler::Bundler<L,R>>::merge_deps
   9: swc_bundler::bundler::chunk::merge::<impl swc_bundler::bundler::Bundler<L,R>>::merge_modules
  10: scoped_tls::ScopedKey<T>::set
  11: scoped_tls::ScopedKey<T>::set
  12: core::iter::adapters::map_fold::{{closure}}
  13: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::spec_extend
  14: core::iter::traits::iterator::Iterator::collect
  15: swc_bundler::bundler::chunk::merge::<impl swc_bundler::bundler::Bundler<L,R>>::merge_deps
  16: swc_bundler::bundler::chunk::merge::<impl swc_bundler::bundler::Bundler<L,R>>::merge_modules
  17: swc_bundler::bundler::chunk::<impl swc_bundler::bundler::Bundler<L,R>>::chunk
  18: deno::module_graph::Graph::emit_bundle
  19: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  20: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  21: tokio::runtime::Runtime::block_on
  22: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace

I can't figure out what it means or how to fix it.

Deno seems to be able to bundle other libraries from Skypack correctly such as

``````deno bundle https://cdn.skypack.dev/lit-element lit-element.js```

So it could just be a problem with tensorflow.

@lucacasonato
Copy link
Member

cc @kdy1

@lucacasonato lucacasonato added bug Something isn't working correctly swc related to swc (bundling/transpiling) cli related to cli/ dir labels Dec 3, 2020
@kdy1 kdy1 mentioned this issue Dec 3, 2020
7 tasks
kdy1 added a commit to kdy1/swc that referenced this issue Dec 6, 2020
kdy1 added a commit to swc-project/swc that referenced this issue Dec 9, 2020
swc_bundler:
 - Handle indirect wrapped es modules. (denoland/deno#8597, denoland/deno#8625)
 - Respect `export { foo }`. (denoland/deno#8626)

swc_ecma_parser:
- Allow `??=`, `||=`, `??=` in non-ts modules. (denoland/deno#8627)

swc_ecma_transforms:
 - Make `hygiene` check if a variable with expanded name exists. (denoland/deno#8620)
 - Handle `??=` correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir swc related to swc (bundling/transpiling)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants