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

Unhelpful error when trying to export with broken npm #148

Open
Grazfather opened this issue Mar 5, 2021 · 5 comments
Open

Unhelpful error when trying to export with broken npm #148

Grazfather opened this issue Mar 5, 2021 · 5 comments

Comments

@Grazfather
Copy link

Looks like my npm is in a weird state.

pi@raspberrypi:~/code/tempplot $ npm
pi@raspberrypi:~/code/tempplot $ echo $?
1

Anyway, this leads to an unhelpful error when I try to export!:

21-03-05 15:39:10 raspberrypi INFO [oz.core:425] - input: /tmp/8be58180-75c4-4b19-9c93-21a3cb728d24197201720715894158.vl.json
21-03-05 15:39:10 raspberrypi INFO [oz.core:426] - output: /tmp/916168d5-fb17-4525-9b7f-2c81472168694982888235139343259.png
21-03-05 15:39:10 raspberrypi ERROR [oz.core:435] - Problem creating output
21-03-05 15:39:10 raspberrypi ERROR [oz.core:436] -
21-03-05 15:39:10 raspberrypi ERROR [oz.core:689] - Unable to execute static embed
21-03-05 15:39:10 raspberrypi ERROR [oz.core:690] -
                clojure.main.main      main.java:   40
                              ...
                clojure.main/main       main.clj:  616
                clojure.main/main       main.clj:  664
            clojure.main/null-opt       main.clj:  542
          clojure.main/initialize       main.clj:  508
            clojure.main/init-opt       main.clj:  477
         clojure.main/load-script       main.clj:  475
                              ...
                     user/eval140      REPL Input
                              ...
              tempplot.core/-main       core.clj:  162
              tempplot.core/-main       core.clj:  167
           tempplot.core/-main/fn       core.clj:  180
                  oz.core/export!       core.clj:  883
                  oz.core/export!       core.clj:  888
                              ...                                                                                                                                                                     │·····································
             oz.core/eval31455/fn       core.clj:  866                                                                                                                                                │·····································
                  oz.core/compile       core.clj: 1090                                                                                                                                                │·····································
                              ...                                                                                                                                                                     │·····································
             oz.core/eval31442/fn       core.clj:  833                                                                                                                                                │·····································
                     oz.core/html       core.clj:  819                                                                                                                                                │·····································
                  oz.core/html/fn       core.clj:  819                                                                                                                                                │·····································
           oz.core/embed-for-html       core.clj:  716                                                                                                                                                │·····································
             oz.core/compile-tags       core.clj:  531                                                                                                                                                │·····································
             clojure.walk/prewalk       walk.clj:   65                                                                                                                                                │·····································
                clojure.walk/walk       walk.clj:   50                                                                                                                                                │·····································
                clojure.core/into       core.clj: 6895                                                                                                                                                │·····································
              clojure.core/reduce       core.clj: 6828                                                                                                                                                │·····································
      clojure.core.protocols/fn/G  protocols.clj:   13                                                                                                                                                │·····································
        clojure.core.protocols/fn  protocols.clj:   75                                                                                                                                                │·····································
clojure.core.protocols/seq-reduce  protocols.clj:   24                                                                                                                                                │·····································
                 clojure.core/seq       core.clj:  137                                                                                                                                                │·····································
                              ...                                                                                                                                                                     │·····································
              clojure.core/map/fn       core.clj: 2753                                                                                                                                                │·····································
          clojure.core/partial/fn       core.clj: 2624                                                                                                                                                │·····································
             clojure.walk/prewalk       walk.clj:   65                                                                                                                                                │·····································
                clojure.walk/walk       walk.clj:   50                                                                                                                                                │·····································
                clojure.core/into       core.clj: 6895                                                                                                                                                │·····································
              clojure.core/reduce       core.clj: 6828                                                                                                                                                │·····································
      clojure.core.protocols/fn/G  protocols.clj:   13                                                                                                                                                │·····································
        clojure.core.protocols/fn  protocols.clj:   75                                                                                                                                                │·····································
clojure.core.protocols/seq-reduce  protocols.clj:   24                                                                                                                                                │·····································
                 clojure.core/seq       core.clj:  137                                                                                                                                                │·····································
                              ...                                                                                                                                                                     │·····································
              clojure.core/map/fn       core.clj: 2753                                                                                                                                                │·····································
          clojure.core/partial/fn       core.clj: 2624                                                                                                                                                │·····································
             clojure.walk/prewalk       walk.clj:   65                                                                                                                                                │·····································
                clojure.walk/walk       walk.clj:   50                                                                                                                                                │·····································
                clojure.core/into       core.clj: 6895                                                                                                                                                │·····································
              clojure.core/reduce       core.clj: 6828                                                                                                                                                │·····································
      clojure.core.protocols/fn/G  protocols.clj:   13                                                                                                                                                │·····································
        clojure.core.protocols/fn  protocols.clj:   75                                                                                                                                                │·····································
clojure.core.protocols/seq-reduce  protocols.clj:   24                                                                                                                                                │·····································
                 clojure.core/seq       core.clj:  137                                                                                                                                                │·····································
                              ...                                                                                                                                                                     │·····································
              clojure.core/map/fn       core.clj: 2753                                                                                                                                                │·····································
          clojure.core/partial/fn       core.clj: 2624                                                                                                                                                │·····································
             clojure.walk/prewalk       walk.clj:   65                                                                                                                                                │·····································
          oz.core/compile-tags/fn       core.clj:  539                                                                                                                                                │·····································
            oz.core/compiled-form       core.clj:  521                                                                                                                                                │·····································
          clojure.core/partial/fn       core.clj: 2624                                                                                                                                                │·····································
          oz.core/embed-vega-form       core.clj:  678                                                                                                                                                │·····································
       oz.core/embed-vega-form/fn       core.clj:  684                                                                                                                                                │·····································
                oz.core/embed-png       core.clj:  653                                                                                                                                                │·····································
            oz.core/base64-encode       core.clj:  647                                                                                                                                                │·····································
java.lang.ClassCastException: class java.lang.String cannot be cast to class [B (java.lang.String and [B are in module java.base of loader 'bootstrap')                                               │·····································
 
@metasoarous
Copy link
Owner

Hi @Grazfather; Thanks for posting this issue, and for doing a bit of hunting into your npm environment.

Do you have a suggestion for how to improve the error message? I do believe that Unable to execute static embed is in a log statement in the code somewhere, so we could easily rewrite that line to say something more informative.

Also, are you running Oz on a raspberry pi!?

Thanks

@Grazfather
Copy link
Author

Grazfather commented Mar 5, 2021

Do you have a suggestion for how to improve the error message? I do believe that Unable to execute static embed is in a log statement in the code somewhere, so we could easily rewrite that line to say something more informative.

I had a 'better' error before I tried to install the vega stuff with npm, it told me that I had to install them. I think a similar message that hinted that it's a problem that lives in javascript land would be helpful.

Also, are you running Oz on a raspberry pi!?

I'm trying to!

@metasoarous
Copy link
Owner

I think a similar message that hinted that it's a problem that lives in javascript land would be helpful.

Yeah; I think something like Unable to execute static embed - check that vega-cli tooling is properly functioning (vl2png, vl2svg, etc) would be pretty clear and helpful. Thoughts on that?

I'm trying to!

That's fantastic! I'd love to know more about this! If you can, please share a bit more here.

Thanks!

@Grazfather
Copy link
Author

Yeah; I think something like Unable to execute static embed - check that vega-cli tooling is properly functioning (vl2png, vl2svg, etc) would be pretty clear and helpful. Thoughts on that?

That would be pretty helpful!

@BorisVSchmid
Copy link

Installed npm (https://nodejs.org/en/download/), then vega (npm install -g vega), and then vega-cli (npm install -g vega-cli) on windows, and made sure that the vg2png etc are on path (C:\Users\boris\AppData\Roaming\npm).

Running an embed still gives "Unable to execute static embed", and also "Cannot run program "which"" (which makes sense, as we are on windows).

@metasoarous metasoarous added this to Priority in Oz development planning Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants